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: eff55ceb1b00b17900d4a086d7bdc67a017d169b (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
41
42
43
44
45
46
47
48
49
50
51
<?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)
    {
        $category   = 'General_Actions';
        $controller = 'Actions';

        $widgetsList->add($category, 'General_Pages', $controller, 'getPageUrls');
        $widgetsList->add($category, 'Actions_WidgetPageTitles', $controller, 'getPageTitles');
        $widgetsList->add($category, 'General_Outlinks', $controller, 'getOutlinks');
        $widgetsList->add($category, 'General_Downloads', $controller, 'getDownloads');
        $widgetsList->add($category, 'Actions_WidgetPagesEntry', $controller, 'getEntryPageUrls');
        $widgetsList->add($category, 'Actions_WidgetPagesExit', $controller, 'getExitPageUrls');
        $widgetsList->add($category, 'Actions_WidgetEntryPageTitles', $controller, 'getEntryPageTitles');
        $widgetsList->add($category, 'Actions_WidgetExitPageTitles', $controller, 'getExitPageTitles');

        $actions = new Actions();
        if ($actions->isSiteSearchEnabled()) {
            $this->addSearchWidgets($widgetsList, $controller);
        }
    }

    private function addSearchWidgets(WidgetsList $widgetsList, $controller)
    {
        $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');
    }

}