Loading core/lib/Drupal/Core/DefaultContent/ContentExportCommand.php +4 −7 Original line number Diff line number Diff line Loading @@ -147,19 +147,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int * A generator that yields content entities. */ private function loadEntities(ContentEntityStorageInterface $storage, string|int|null $entity_id, array $bundles = []): iterable { $query = $storage->getQuery() ->accessCheck(FALSE); $values = []; $entity_type = $storage->getEntityType(); if ($bundles) { $query->condition($entity_type->getKey('bundle'), $bundles, 'IN'); $values[$entity_type->getKey('bundle')] = $bundles; } if ($entity_id) { $query->condition($entity_type->getKey('id'), $entity_id); } foreach ($query->execute() as $id) { yield $storage->load($id); $values[$entity_type->getKey('id')] = $entity_id; } return $storage->loadByProperties($values); } } Loading
core/lib/Drupal/Core/DefaultContent/ContentExportCommand.php +4 −7 Original line number Diff line number Diff line Loading @@ -147,19 +147,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int * A generator that yields content entities. */ private function loadEntities(ContentEntityStorageInterface $storage, string|int|null $entity_id, array $bundles = []): iterable { $query = $storage->getQuery() ->accessCheck(FALSE); $values = []; $entity_type = $storage->getEntityType(); if ($bundles) { $query->condition($entity_type->getKey('bundle'), $bundles, 'IN'); $values[$entity_type->getKey('bundle')] = $bundles; } if ($entity_id) { $query->condition($entity_type->getKey('id'), $entity_id); } foreach ($query->execute() as $id) { yield $storage->load($id); $values[$entity_type->getKey('id')] = $entity_id; } return $storage->loadByProperties($values); } }