Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Widgets.php « Actions « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be1f7901667d8c6e464135f326778fdf5eb6a186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
 * Piwik - Open source web analytics
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 */
namespace Piwik\Plugins\Actions;

use Piwik\WidgetsList;

class Widgets extends \Piwik\Plugin\Widgets
{

    public function configure(WidgetsList $widgetsList)
    {
        $actions = new Actions();
        if ($actions->isSiteSearchEnabled()) {
            $this->addSearchWidgets($widgetsList);
        }
    }

    private function addSearchWidgets(WidgetsList $widgetsList)
    {
        $controller = 'Actions';
        $category   = 'Actions_SubmenuSitesearch';

        $widgetsList->add($category, 'Actions_WidgetSearchKeywords', $controller, 'getSiteSearchKeywords');

        if (Actions::isCustomVariablesPluginsEnabled()) {
            $widgetsList->add($category, 'Actions_WidgetSearchCategories', $controller, 'getSiteSearchCategories');
        }

        $widgetsList->add($category, 'Actions_WidgetSearchNoResultKeywords', $controller, 'getSiteSearchNoResultKeywords');
        $widgetsList->add($category, 'Actions_WidgetPageUrlsFollowingSearch', $controller, 'getPageUrlsFollowingSiteSearch');
        $widgetsList->add($category, 'Actions_WidgetPageTitlesFollowingSearch', $controller, 'getPageTitlesFollowingSiteSearch');
    }

}