public function TypedData::getPropertyPath

Implements \Drupal\Core\TypedData\TypedDataInterface::getPropertyPath().

Overrides TypedDataInterface::getPropertyPath

File

drupal/core/lib/Drupal/Core/TypedData/TypedData.php, line 143
Contains \Drupal\Core\TypedData\TypedData.

Class

TypedData
The abstract base class for typed data.

Namespace

Drupal\Core\TypedData

Code

public function getPropertyPath() {
  if (isset($this->parent)) {

    // The property path of this data object is the parent's path appended
    // by this object's name.
    $prefix = $this->parent
      ->getPropertyPath();
    return (strlen($prefix) ? $prefix . '.' : '') . $this->name;
  }
  elseif (isset($this->name)) {
    return $this->name;
  }
  return '';
}