You are here

public function GroupContentEnablerBase::getContentLabel in Group 8

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 GroupContentEnablerInterface::getContentLabel

File

src/Plugin/GroupContentEnablerBase.php, line 162

Class

GroupContentEnablerBase
Provides a base class for GroupContentEnabler plugins.

Namespace

Drupal\group\Plugin

Code

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