Function getRoleFromRelationType

  • Gets the entity role in the given relation type by checking for the reverse indicator

    A reversed relation means the relation is considered from the object entity point of view. The reverse indicator is a prefix added as a convention in CubicWeb.

    Parameters

    • relationType: string

      The relation type to check

    Returns EntityRole

    "subject" if the relation is not reversed, "object" otherwise

Generated using TypeDoc