new (require("baja/tag/ComponentTags"))(owner)
Tags is used to access the direct tags on a Component instance.
Parameters:
Name | Type | Description |
---|---|---|
owner |
baja.Component | The Component instance owner. |
Methods
-
<static> idToSlotName(id)
-
Return a Slot name from the specified Id.
Parameters:
Name Type Description id
String | module:baja/tag/Id The Id or
qname name to create the Slot name from.Returns:
The Slot Name.
- Type
- String
-
<static> slotNameToQname(slotName)
-
Returns a qname from a Slot name.
Parameters:
Name Type Description slotName
String The slot name to create the Id from.
Returns:
- Type
- String
-
<static> slotToQname(slot)
-
Returns a qname from a Slot.
Parameters:
Name Type Description slot
baja.Slot The Slot to create the Id from.
Returns:
- Type
- String
-
contains(id)
-
Returns true if a Tag with the specified Id (or qname) is found.
Parameters:
Name Type Description id
String | module:baja/tag/Id The Id
used for the search. This can be an Id or a qname for an Id.Returns:
Returns true if found.
- Type
- Boolean
-
get(id)
-
Get the value of the Tag with the given id if it exists.
Parameters:
Name Type Description id
String | module:baja/tag/Id The Id
used for the search. This can be an Id or a qname for an Id.Returns:
The value for the tag if it exists or else null.
-
getAll()
-
Returns a copy of the contained Tags array.
Returns:
An array of Tag objects.
- Type
- Array.<module:baja/tag/Tag>
-
isEmpty()
-
Returns:
Returns true if there are no Tag objects.
- Type
- Boolean
-
isTaggableSlot(slot)
-
Returns true if the specified Slot is taggable.
Parameters:
Name Type Description slot
baja.Slot | String The Slot (or slot name) that's tested
to see if it's a taggable Slot.Returns:
Returns true if the Slot is taggable.
- Type
- Boolean