You are here

public function NodeProcessor::getDataToExport in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/content_synchronizer/entity_processor/NodeProcessor.php \Drupal\content_synchronizer\Plugin\content_synchronizer\entity_processor\NodeProcessor::getDataToExport()
  2. 3.x src/Plugin/content_synchronizer/entity_processor/NodeProcessor.php \Drupal\content_synchronizer\Plugin\content_synchronizer\entity_processor\NodeProcessor::getDataToExport()

Return the data to export.

Get the array of data to export in array format : [ "property_1"=>[ "value1", "value2"] "property_2"=>[ "value1"] ].

Parameters

\Drupal\Core\Entity\Entity $entityToExport: The entity to export.

Return value

array The data to export.

Overrides EntityProcessorBase::getDataToExport

File

src/Plugin/content_synchronizer/entity_processor/NodeProcessor.php, line 33

Class

NodeProcessor
Plugin implementation of the 'accordion' formatter.

Namespace

Drupal\content_synchronizer\Plugin\content_synchronizer\entity_processor

Code

public function getDataToExport(Entity $entityToExport) {

  // Init data to export:
  $data = parent::getDataToExport($entityToExport);

  // Add bundle :
  $data['type'] = $entityToExport
    ->bundle();
  return $data;
}