本文整理汇总了PHP中Piwik\WidgetsList::add方法的典型用法代码示例。如果您正苦于以下问题:PHP WidgetsList::add方法的具体用法?PHP WidgetsList::add怎么用?PHP WidgetsList::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\WidgetsList
的用法示例。
在下文中一共展示了WidgetsList::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
public function configure(WidgetsList $widgetsList)
{
$category = 'Insights_WidgetCategory';
$controller = 'Insights';
$widgetsList->add($category, 'Insights_OverviewWidgetTitle', $controller, 'getInsightsOverview');
$widgetsList->add($category, 'Insights_MoversAndShakersWidgetTitle', $controller, 'getOverallMoversAndShakers');
}
示例2: configure
public function configure(WidgetsList $widgetsList)
{
$category = 'VisitsSummary_VisitsSummary';
$controller = 'VisitTime';
$widgetsList->add($category, 'VisitTime_WidgetLocalTime', $controller, 'getVisitInformationPerLocalTime');
$widgetsList->add($category, 'VisitTime_WidgetServerTime', $controller, 'getVisitInformationPerServerTime');
$widgetsList->add($category, 'VisitTime_VisitsByDayOfWeek', $controller, 'getByDayOfWeek');
}
示例3: addGoalsWidgets
private function addGoalsWidgets(WidgetsList $widgetsList, $idSite)
{
$widgetsList->add('Goals_Goals', 'Goals_GoalsOverview', 'Goals', 'widgetGoalsOverview');
$goals = API::getInstance()->getGoals($idSite);
if (count($goals) > 0) {
foreach ($goals as $goal) {
$widgetsList->add('Goals_Goals', Common::sanitizeInputValue($goal['name']), 'Goals', 'widgetGoalReport', array('idGoal' => $goal['idgoal']));
}
}
}
示例4: addSearchWidgets
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');
}
示例5: registerWidgets
public function registerWidgets()
{
if (PluginManager::getInstance()->isPluginActivated('UserCountry')) {
WidgetsList::add('General_Visitors', Piwik::translate('UserCountryMap_VisitorMap'), 'UserCountryMap', 'visitorMap');
WidgetsList::add('Live!', Piwik::translate('UserCountryMap_RealTimeMap'), 'UserCountryMap', 'realtimeMap');
}
}
示例6: addWidget
public function addWidget()
{
WidgetsList::add('Live!', 'Live_VisitorsInRealTime', 'Live', 'widget');
WidgetsList::add('Live!', 'Live_VisitorLog', 'Live', 'getVisitorLog', array('small' => 1));
WidgetsList::add('Live!', 'Live_RealTimeVisitorCount', 'Live', 'getSimpleLastVisitCount');
WidgetsList::add('Live!', 'Live_VisitorProfile', 'Live', 'getVisitorProfilePopup');
}
示例7: addWidgets
public function addWidgets()
{
WidgetsList::add('General_Visitors', 'VisitorInterest_WidgetLengths', 'VisitorInterest', 'getNumberOfVisitsPerVisitDuration');
WidgetsList::add('General_Visitors', 'VisitorInterest_WidgetPages', 'VisitorInterest', 'getNumberOfVisitsPerPage');
WidgetsList::add('General_Visitors', 'VisitorInterest_visitsByVisitCount', 'VisitorInterest', 'getNumberOfVisitsByVisitCount');
WidgetsList::add('General_Visitors', 'VisitorInterest_WidgetVisitsByDaysSinceLast', 'VisitorInterest', 'getNumberOfVisitsByDaysSinceLast');
}
示例8: addWidgets
public function addWidgets()
{
foreach (self::getLabelTranslations() as $apiMethod => $labels) {
$params = array('secondaryDimension' => API::getInstance()->getDefaultSecondaryDimension($apiMethod));
WidgetsList::add('Events_Events', $labels[0], 'Events', $apiMethod, $params);
}
}
示例9: postLoad
public function postLoad()
{
if (PluginManager::getInstance()->isPluginActivated('UserCountry')) {
WidgetsList::add('General_Visitors', Piwik::translate('UserCountryMap_VisitorMap'), 'UserCountryMap', 'visitorMap');
WidgetsList::add('Live!', Piwik::translate('UserCountryMap_RealTimeMap'), 'UserCountryMap', 'realtimeMap');
}
Piwik::addAction('Template.leftColumnUserCountry', array('Piwik\\Plugins\\UserCountryMap\\UserCountryMap', 'insertMapInLocationReport'));
}
示例10: addWidgets
public function addWidgets()
{
foreach ($this->getRawMetadataReports() as $report) {
list($category, $name, $controllerName, $controllerAction) = $report;
if ($category == false) {
continue;
}
WidgetsList::add($category, $name, $controllerName, $controllerAction);
}
}
示例11: addWidgets
/**
* Adds Referrer widgets
*/
function addWidgets()
{
WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetKeywords', 'Referrers', 'getKeywords');
WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetExternalWebsites', 'Referrers', 'getWebsites');
WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetSocials', 'Referrers', 'getSocials');
WidgetsList::add('Referrers_Referrers', 'Referrers_SearchEngines', 'Referrers', 'getSearchEngines');
WidgetsList::add('Referrers_Referrers', 'Referrers_Campaigns', 'Referrers', 'getCampaigns');
WidgetsList::add('Referrers_Referrers', 'General_Overview', 'Referrers', 'getReferrerType');
WidgetsList::add('Referrers_Referrers', 'Referrers_WidgetGetAll', 'Referrers', 'getAll');
if (SettingsPiwik::isSegmentationEnabled()) {
WidgetsList::add('SEO', 'Referrers_WidgetTopKeywordsForPages', 'Referrers', 'getKeywordsForPage');
}
}
示例12: addWidgets
function addWidgets()
{
WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitTime_WidgetLocalTime', 'VisitTime', 'getVisitInformationPerLocalTime');
WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitTime_WidgetServerTime', 'VisitTime', 'getVisitInformationPerServerTime');
WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitTime_VisitsByDayOfWeek', 'VisitTime', 'getByDayOfWeek');
}
示例13: configureWidget
/**
* By default a widget will be configured for this report if a {@link $widgetTitle} is set. If you want to customize
* the way the widget is added or modify any other behavior you can overwrite this method.
* @param WidgetsList $widget
* @api
*/
public function configureWidget(WidgetsList $widget)
{
if ($this->widgetTitle) {
$params = array();
if (!empty($this->widgetParams) && is_array($this->widgetParams)) {
$params = $this->widgetParams;
}
$widget->add($this->category, $this->widgetTitle, $this->module, $this->action, $params);
}
}
示例14: addWidgets
function addWidgets()
{
WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetLastVisits', 'VisitsSummary', 'getEvolutionGraph', array('columns' => array('nb_visits')));
WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetVisits', 'VisitsSummary', 'getSparklines');
WidgetsList::add('VisitsSummary_VisitsSummary', 'VisitsSummary_WidgetOverviewGraph', 'VisitsSummary', 'index');
}
示例15: addWidgets
public function addWidgets()
{
WidgetsList::add('Example Widgets', 'Piwik.org Blog', 'ExampleRssWidget', 'rssPiwik');
WidgetsList::add('Example Widgets', 'Piwik Changelog', 'ExampleRssWidget', 'rssChangelog');
}