You are here

public function EntityInlineForm::getEntityLabel in Inline Entity Form 8

Gets the label of the given entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The given entity.

Return value

string The entity label.

Overrides InlineFormInterface::getEntityLabel

File

src/Form/EntityInlineForm.php, line 108

Class

EntityInlineForm
Generic entity inline form handler.

Namespace

Drupal\inline_entity_form\Form

Code

public function getEntityLabel(EntityInterface $entity) {
  return $entity
    ->label();
}