You are here

public function MatomoCustomVars::transform in Matomo Analytics 8

Flatten custom vars array.

Overrides ProcessPluginBase::transform

File

src/Plugin/migrate/process/MatomoCustomVars.php, line 21

Class

MatomoCustomVars
This plugin flattens the custom variables array.

Namespace

Drupal\matomo\Plugin\migrate\process

Code

public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
  list($matomo_custom_vars) = $value;
  return isset($matomo_custom_vars['slots']) ? $matomo_custom_vars['slots'] : [];
}