function View::label

Same name in other branches
  1. 9 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::label()
  2. 8.9.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::label()
  3. 11.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::label()

Overrides EntityBase::label

File

core/modules/views/src/Entity/View.php, line 141

Class

View
Defines a View configuration entity class.

Namespace

Drupal\views\Entity

Code

public function label() {
    if (!($label = $this->get('label'))) {
        @trigger_error('Saving a view without an explicit label is deprecated in drupal:10.2.0 and will raise an error in drupal:11.0.0. See https://www.drupal.org/node/3381669', E_USER_DEPRECATED);
        $label = $this->id();
    }
    return $label;
}

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