function EntityType::get

Same name in this branch
  1. 9 core/lib/Drupal/Core/Entity/Annotation/EntityType.php \Drupal\Core\Entity\Annotation\EntityType::get()
Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::get()
  2. 8.9.x core/lib/Drupal/Core/Entity/Annotation/EntityType.php \Drupal\Core\Entity\Annotation\EntityType::get()
  3. 10 core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::get()
  4. 10 core/lib/Drupal/Core/Entity/Annotation/EntityType.php \Drupal\Core\Entity\Annotation\EntityType::get()
  5. 11.x core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::get()
  6. 11.x core/lib/Drupal/Core/Entity/Annotation/EntityType.php \Drupal\Core\Entity\Annotation\EntityType::get()

Overrides EntityTypeInterface::get

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

public function get($property) {
    if (property_exists($this, $property)) {
        $value = $this->{$property} ?? NULL;
    }
    else {
        $value = $this->additional[$property] ?? NULL;
    }
    return $value;
}

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