You are here

public function GroupRelationBase::getContentLabel in Group 2.0.x

Retrieves the label for a piece of group content.

Parameters

\Drupal\group\Entity\GroupContentInterface $group_content: The group content entity to retrieve the label for.

Return value

string The label as expected by \Drupal\Core\Entity\EntityInterface::label().

Overrides GroupRelationInterface::getContentLabel

File

src/Plugin/Group/Relation/GroupRelationBase.php, line 159

Class

GroupRelationBase
Provides a base class for GroupContentEnabler plugins.

Namespace

Drupal\group\Plugin\Group\Relation

Code

public function getContentLabel(GroupContentInterface $group_content) {
  return $group_content
    ->getEntity()
    ->label();
}