function FieldStorageConfig::getPropertyDefinition

Gets the definition of a contained property.

Parameters

string $name: The name of property.

Return value

\Drupal\Core\TypedData\DataDefinitionInterface|null The definition of the property or NULL if the property does not exist.

Overrides FieldStorageDefinitionInterface::getPropertyDefinition

File

core/modules/field/src/Entity/FieldStorageConfig.php, line 783

Class

FieldStorageConfig
Defines the Field storage configuration entity.

Namespace

Drupal\field\Entity

Code

public function getPropertyDefinition($name) {
  if (!is_string($name)) {
    @trigger_error('Calling ' . __CLASS__ . '::getPropertyDefinition() with a non-string $name is deprecated in drupal:11.3.0 and throws an exception in drupal:12.0.0. See https://www.drupal.org/node/3557373', E_USER_DEPRECATED);
  }
  if (!isset($this->propertyDefinitions)) {
    $this->getPropertyDefinitions();
  }
  if (isset($this->propertyDefinitions[$name])) {
    return $this->propertyDefinitions[$name];
  }
}

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