You are here

function drush_gathercontent_list_mappings in GatherContent 7.3

Same name and namespace in other branches
  1. 8.5 gathercontent.drush.inc \drush_gathercontent_list_mappings()
  2. 8.3 gathercontent.drush.inc \drush_gathercontent_list_mappings()
  3. 8.4 gathercontent.drush.inc \drush_gathercontent_list_mappings()

Implements drush_COMMAND().

File

./gathercontent.drush.inc, line 98
Drush command to cli config import.

Code

function drush_gathercontent_list_mappings() {

  /** @var stdClass $gc_mappings */
  $gc_mappings = entity_load('gathercontent_mapping');
  $mappings = [];
  foreach ($gc_mappings as $gc_mapping) {
    $mappings[$gc_mapping->id] = [
      'mapping_id' => $gc_mapping->id,
      'project_id' => $gc_mapping->gathercontent_project_id,
      'project_label' => $gc_mapping->gathercontent_project,
      'template_id' => $gc_mapping->gathercontent_template_id,
      'template_label' => $gc_mapping->gathercontent_template,
      'content_type' => $gc_mapping->content_type,
    ];
  }
  return $mappings;
}