class LinkOptions
Same name in this branch
- main core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php \Drupal\menu_link_content\Plugin\migrate\process\LinkOptions
Same name and namespace in other branches
- 11.x core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php \Drupal\menu_link_content\Plugin\migrate\process\LinkOptions
- 10 core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php \Drupal\menu_link_content\Plugin\migrate\process\LinkOptions
- 9 core/modules/menu_link_content/src/Plugin/migrate/process/LinkOptions.php \Drupal\menu_link_content\Plugin\migrate\process\LinkOptions
- 11.x core/modules/migrate/src/Plugin/migrate/process/LinkOptions.php \Drupal\migrate\Plugin\migrate\process\LinkOptions
Converts links options.
Examples:
process:
link/options:
plugin: link_options
source: options
This will convert the query options of the link.
Attributes
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\DependencyInjection\AutowiredInstanceTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
- class \Drupal\migrate\ProcessPluginBase implements \Drupal\migrate\Plugin\MigrateProcessInterface extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\migrate\Plugin\migrate\process\LinkOptions extends \Drupal\migrate\ProcessPluginBase
- class \Drupal\migrate\ProcessPluginBase implements \Drupal\migrate\Plugin\MigrateProcessInterface extends \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\DependencyInjection\AutowiredInstanceTrait, \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait extends \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of LinkOptions
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ process/ LinkOptions.php, line 24
Namespace
Drupal\migrate\Plugin\migrate\processView source
class LinkOptions extends ProcessPluginBase {
/**
* {@inheritdoc}
*/
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (isset($value['query']) && is_string($value['query'])) {
// If the query parameters are stored as a string, such as 'a=1&b=2', then
// convert it into an array.
parse_str($value['query'], $value['query']);
}
return $value;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.