MatomoCustomVars.php in Matomo Analytics 8
File
src/Plugin/migrate/process/MatomoCustomVars.php
View source
<?php
namespace Drupal\matomo\Plugin\migrate\process;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class MatomoCustomVars extends ProcessPluginBase {
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'] : [];
}
}