public function PiwikCustomVars::transform in Piwik Web Analytics 8
Flatten custom vars array.
Overrides ProcessPluginBase::transform
File
- src/
Plugin/ migrate/ process/ PiwikCustomVars.php, line 21
Class
- PiwikCustomVars
- This plugin flattens the custom variables array.
Namespace
Drupal\piwik\Plugin\migrate\processCode
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
list($piwik_custom_vars) = $value;
return isset($piwik_custom_vars['slots']) ? $piwik_custom_vars['slots'] : [];
}