You are here

public function ContentLoaderInterface::buildEntity in YAML Content 8.2

Same name and namespace in other branches
  1. 8 src/ContentLoader/ContentLoaderInterface.php \Drupal\yaml_content\ContentLoader\ContentLoaderInterface::buildEntity()

Build an entity from the provided content data.

Parameters

string $entity_type: The entity type machine name to be created.

array $content_data: Parameters:

  • `entity`: (required) The entity type machine name.
  • `bundle`: (required) The bundle machine name.
  • Additional field and property data keyed by field or property name.

array $context: Contextual data available for more specific entity creation requirements.

Return value

\Drupal\Core\Entity\EntityInterface A loaded entity object ready to be saved.

1 method overrides ContentLoaderInterface::buildEntity()
ContentLoaderBase::buildEntity in src/ContentLoader/ContentLoaderBase.php
Build an entity from the provided content data.

File

src/ContentLoader/ContentLoaderInterface.php, line 63

Class

ContentLoaderInterface
Defines a common interface for content loader implementations.

Namespace

Drupal\yaml_content\ContentLoader

Code

public function buildEntity($entity_type, array $content_data, array &$context);