function drush_gathercontent_list_mappings in GatherContent 8.5
Same name and namespace in other branches
- 8.3 gathercontent.drush.inc \drush_gathercontent_list_mappings()
- 8.4 gathercontent.drush.inc \drush_gathercontent_list_mappings()
- 7.3 gathercontent.drush.inc \drush_gathercontent_list_mappings()
Implements drush_COMMAND().
File
- ./
gathercontent.drush.inc, line 103 - Drush command to cli config import.
Code
function drush_gathercontent_list_mappings() {
/** @var \Drupal\gathercontent\Entity\MappingInterface[] $gc_mappings */
$gc_mappings = \Drupal::entityTypeManager()
->getStorage('gathercontent_mapping')
->loadMultiple();
$mappings = [];
foreach ($gc_mappings as $gc_mapping) {
$mappings[$gc_mapping
->id()] = [
'mapping_id' => $gc_mapping
->id(),
'project_id' => $gc_mapping
->getGathercontentProjectId(),
'project_label' => $gc_mapping
->getGathercontentProject(),
'template_id' => $gc_mapping
->getGathercontentTemplateId(),
'template_label' => $gc_mapping
->getGathercontentTemplate(),
'content_type' => $gc_mapping
->getContentType(),
];
}
return $mappings;
}