/** * Get all log table instances defined by any activated and loaded plugin. The returned tables are not sorted in * any order. * @return LogTable[] */ public function getAllLogTables() { if (!isset($this->tablesCache)) { $tables = $this->pluginManager->findMultipleComponents('Tracker', 'Piwik\\Tracker\\LogTable'); $this->tablesCache = array(); foreach ($tables as $table) { $this->tablesCache[] = StaticContainer::get($table); } } return $this->tablesCache; }
/** * @return ReleaseChannel[] */ public function getAllReleaseChannels() { $classNames = $this->pluginManager->findMultipleComponents('ReleaseChannel', 'Piwik\\UpdateCheck\\ReleaseChannel'); $channels = array(); foreach ($classNames as $className) { $channels[] = StaticContainer::get($className); } usort($channels, function (ReleaseChannel $a, ReleaseChannel $b) { if ($a->getOrder() === $b->getOrder()) { return 0; } return $a->getOrder() < $b->getOrder() ? -1 : 1; }); return $channels; }
/** * @return string[] */ private function getAllWidgetContainerConfigClassNames() { return $this->pluginManager->findMultipleComponents('Widgets', 'Piwik\\Widget\\WidgetContainerConfig'); }