Module: baja/tag/ComponentRelations


new (require("baja/tag/ComponentRelations"))(owner)

Relations is used to access the direct relations on a Component instance.

Parameters:
Name Type Description
owner baja.Component

The Component instance owner.

Methods


get(id)

Find the specified relation object via its Id and return it.
If the relation can't be found then return null.

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 Relation object
or null if nothing can be found.

Type
module:baja/tag/BRelation

getAll()

Returns a copy of the contained Relations array.

Returns:

An array of Relation objects.

Type
Array.<module:baja/tag/BRelation>

isEmpty()

Returns:

Returns true if there are no relation objects.

Type
Boolean

isRelationSlot(slot)

Returns true if the specified Slot is a relation.

Parameters:
Name Type Description
slot baja.Slot | String

The Slot (or slot name) that's tested
to see if it's a relation Slot.

Returns:

Returns true if the Slot is a Relation.

Type
Boolean