public function Group::getSettingCommands in Googalytics - Google Analytics 8
An array of commands to be sent to Google Analytics.
Return value
array An array of command values.
Overrides DrupalSettingCommandsTrait::getSettingCommands
File
- src/
AnalyticsCommand/ Group.php, line 65
Class
Namespace
Drupal\ga\AnalyticsCommandCode
public function getSettingCommands() {
usort($this->commands, function (DrupalSettingCommandsInterface $a, DrupalSettingCommandsInterface $b) {
return $b
->getPriority() - $a
->getPriority();
});
return array_reduce($this->commands, function ($carry, DrupalSettingCommandsInterface $item) {
return array_merge($carry, $item
->getSettingCommands());
}, []);
}