You are here

protected function ContentEntityNormalizer::addDependency in Default Content for D8 2.0.x

Adds an entity dependency to the normalization root.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity.

2 calls to ContentEntityNormalizer::addDependency()
ContentEntityNormalizer::getValueFromProperty in src/Normalizer/ContentEntityNormalizer.php
Returns the value for a given property.
ContentEntityNormalizer::normalize in src/Normalizer/ContentEntityNormalizer.php
Normalizes the entity into an array structure.

File

src/Normalizer/ContentEntityNormalizer.php, line 459

Class

ContentEntityNormalizer
Normalizes and denormalizes content entities.

Namespace

Drupal\default_content\Normalizer

Code

protected function addDependency(ContentEntityInterface $entity) {
  $this->dependencies[$entity
    ->uuid()] = $entity
    ->getEntityTypeId();
}