ElggEntity::countEntitiesFromRelationship PHP Method

countEntitiesFromRelationship() public method

Gets the number of entities from a specific relationship type
public countEntitiesFromRelationship ( string $relationship, boolean $inverse_relationship = false ) : integer | false
$relationship string Relationship type (eg "friends")
$inverse_relationship boolean Invert relationship
return integer | false The number of entities or false on failure
    public function countEntitiesFromRelationship($relationship, $inverse_relationship = false)
    {
        return elgg_get_entities_from_relationship(array('relationship' => $relationship, 'relationship_guid' => $this->getGUID(), 'inverse_relationship' => $inverse_relationship, 'count' => true));
    }