8.3.x EntityType.php public EntityType::get($property)
8.3.x EntityType.php public EntityType::get()
8.0.x EntityType.php public EntityType::get($property)
8.0.x EntityType.php public EntityType::get()
8.1.x EntityType.php public EntityType::get($property)
8.1.x EntityType.php public EntityType::get()
8.2.x EntityType.php public EntityType::get($property)
8.2.x EntityType.php public EntityType::get()
8.4.x EntityType.php public EntityType::get($property)
8.4.x EntityType.php public EntityType::get()

Gets any arbitrary property.

Parameters

string $property: The property to retrieve.

Return value

mixed The value for that property, or NULL if the property does not exist.

Overrides EntityTypeInterface::get

File

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

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 = isset($this->{$property}) ? $this->{$property} : NULL;
  }
  else {
    $value = isset($this->additional[$property]) ? $this->additional[$property] : NULL;
  }
  return $value;
}