You are here

protected function DefaultWebformHandler::getFieldValuesForReference in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/cms_content_sync/field_handler/DefaultWebformHandler.php \Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler\DefaultWebformHandler::getFieldValuesForReference()
  2. 2.1.x src/Plugin/cms_content_sync/field_handler/DefaultWebformHandler.php \Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler\DefaultWebformHandler::getFieldValuesForReference()

Get the values to be set to the $entity->field_*.

Parameters

$reference:

\Drupal\cms_content_sync\PullIntent $intent:

Return value

array

Overrides EntityReferenceHandlerBase::getFieldValuesForReference

File

src/Plugin/cms_content_sync/field_handler/DefaultWebformHandler.php, line 77

Class

DefaultWebformHandler
Implements webform references.

Namespace

Drupal\cms_content_sync\Plugin\cms_content_sync\field_handler

Code

protected function getFieldValuesForReference($reference, $intent) {
  return [
    'target_id' => $reference
      ->id(),
  ];
}