You are here

function _fieldable_panels_panes_entity_type_mapping in Fieldable Panels Panes (FPP) 1.0.x

Map panel pane to custom block.

Parameters

array $migration: The migration to process.

string $destination: The process destination.

1 call to _fieldable_panels_panes_entity_type_mapping()
fieldable_panels_panes_migration_plugins_alter in ./fieldable_panels_panes.module
Implements hook_migration_plugins_alter().

File

./fieldable_panels_panes.module, line 63
Module file.

Code

function _fieldable_panels_panes_entity_type_mapping(array &$migration, $destination = 'entity_type') {
  $process = $migration['process'][$destination];
  if (!is_array($process)) {
    $process = [
      [
        'plugin' => 'get',
        'source' => 'entity_type',
      ],
    ];
  }
  $process['fieldable_panels_pane'] = [
    'plugin' => 'static_map',
    'map' => [
      'fieldable_panels_pane' => 'block_content',
    ],
    'bypass' => TRUE,
  ];
  $migration['process'][$destination] = $process;
}