You are here

public function EntityType::hasLabelCallback in Drupal 8

Indicates if a label callback exists.

Return value

bool

Overrides EntityTypeInterface::hasLabelCallback

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0. Override the EntityInterface::label() method instead for dynamic labels.

See also

\Drupal\Core\Entity\EntityInterface::label()

\Drupal\Core\Entity\EntityTypeInterface::getLabelCallback()

\Drupal\Core\Entity\EntityTypeInterface::setLabelCallback()

File

core/lib/Drupal/Core/Entity/EntityType.php, line 685

Class

EntityType
Provides an implementation of an entity type and its metadata.

Namespace

Drupal\Core\Entity

Code

public function hasLabelCallback() {
  @trigger_error('EntityType::hasabelCallback() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Override the EntityInterface::label() method instead for dynamic labels. See https://www.drupal.org/node/3050794', E_USER_DEPRECATED);
  return isset($this->label_callback);
}