public function Exporter::getContentToExport in Tome 8
Grabs a list of content to export.
Return value
array An array mapping entity type IDs to arrays of entity IDs to export.
Overrides ExporterInterface::getContentToExport
File
- modules/
tome_sync/ src/ Exporter.php, line 110  
Class
- Exporter
 - Handles exporting of content and file entities.
 
Namespace
Drupal\tome_syncCode
public function getContentToExport() {
  $entities = [];
  $definitions = array_diff_key($this->entityTypeManager
    ->getDefinitions(), array_flip(static::$excludedTypes));
  foreach ($definitions as $entity_type) {
    if (is_a($entity_type
      ->getClass(), '\\Drupal\\Core\\Entity\\ContentEntityInterface', TRUE)) {
      $storage = $this->entityTypeManager
        ->getStorage($entity_type
        ->id());
      $entities[$entity_type
        ->id()] = $storage
        ->getQuery()
        ->execute();
    }
  }
  return $entities;
}