function EntityType::setLabelCallback

Overrides EntityTypeInterface::setLabelCallback

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

public function setLabelCallback($callback) {
    @trigger_error('EntityType::setLabelCallback() 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);
    $this->label_callback = $callback;
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.