8.5.x ConfigEntityBase.php ConfigEntityBase::get($property_name)
8.0.x ConfigEntityBase.php ConfigEntityBase::get($property_name)
8.1.x ConfigEntityBase.php ConfigEntityBase::get($property_name)
8.2.x ConfigEntityBase.php ConfigEntityBase::get($property_name)
8.3.x ConfigEntityBase.php ConfigEntityBase::get($property_name)
8.4.x ConfigEntityBase.php ConfigEntityBase::get($property_name)
8.6.x ConfigEntityBase.php ConfigEntityBase::get($property_name)

Returns the value of a property.

Parameters

string $property_name: The name of the property that should be returned.

Return value

mixed The property if it exists, or NULL otherwise.

Overrides ConfigEntityInterface::get

8 calls to ConfigEntityBase::get()
Block::label in core/modules/block/src/Entity/Block.php
Gets the label of the entity.
EntityDisplayBase::getMode in core/lib/Drupal/Core/Entity/EntityDisplayBase.php
Gets the view or form mode to be displayed.
EntityDisplayBase::getOriginalMode in core/lib/Drupal/Core/Entity/EntityDisplayBase.php
Gets the original view or form mode that was requested.
ImageStyle::getName in core/modules/image/src/Entity/ImageStyle.php
Returns the image style.
Role::getWeight in core/modules/user/src/Entity/Role.php
Returns the weight.

... See full list

File

core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php, line 157

Class

ConfigEntityBase
Defines a base configuration entity class.

Namespace

Drupal\Core\Config\Entity

Code

public function get($property_name) {
  return isset($this->{$property_name}) ? $this->{$property_name} : NULL;
}