Piwik\Plugins\CorePluginsAdmin\Controller::keepPluginsOrThemes PHP Метод

keepPluginsOrThemes() защищенный Метод

protected keepPluginsOrThemes ( $themesOnly, $plugins )
    protected function keepPluginsOrThemes($themesOnly, $plugins)
    {
        $pluginsFiltered = array();
        foreach ($plugins as $name => $thisPlugin) {
            $isTheme = false;
            if (!empty($thisPlugin['info']['theme'])) {
                $isTheme = (bool) $thisPlugin['info']['theme'];
            }
            if ($themesOnly && $isTheme || !$themesOnly && !$isTheme) {
                $pluginsFiltered[$name] = $thisPlugin;
            }
        }
        return $pluginsFiltered;
    }