module:baja/tag/ComponentRelations

module:baja/tag/ComponentRelations

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

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

Source:
Parameters:
Name Type Description
owner baja.Component

The Component instance owner.

Methods

get(id) → {module:baja/tag/BRelation}

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

Source:
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() → {Array.<module:baja/tag/BRelation>}

Description:
  • Returns a copy of the contained Relations array.

Source:
Returns:

An array of Relation objects.

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

isEmpty() → {Boolean}

Source:
Returns:

Returns true if there are no relation objects.

Type
Boolean

isRelationSlot(slot) → {Boolean}

Description:
  • Returns true if the specified Slot is a relation.

Source:
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