本文整理汇总了PHP中Piwik\SettingsPiwik::isSegmentationEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP SettingsPiwik::isSegmentationEnabled方法的具体用法?PHP SettingsPiwik::isSegmentationEnabled怎么用?PHP SettingsPiwik::isSegmentationEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\SettingsPiwik
的用法示例。
在下文中一共展示了SettingsPiwik::isSegmentationEnabled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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');
}
}
示例2: __construct
/**
* Constructor.
*
* @param string $segmentCondition The segment condition, eg, `'browserCode=ff;countryCode=CA'`.
* @param array $idSites The list of sites the segment will be used with. Some segments are
* dependent on the site, such as goal segments.
* @throws
*/
public function __construct($segmentCondition, $idSites)
{
$segmentCondition = trim($segmentCondition);
if (!SettingsPiwik::isSegmentationEnabled() && !empty($segmentCondition)) {
throw new Exception("The Super User has disabled the Segmentation feature.");
}
// First try with url decoded value. If that fails, try with raw value.
// If that also fails, it will throw the exception
try {
$this->initializeSegment(urldecode($segmentCondition), $idSites);
} catch (Exception $e) {
$this->initializeSegment($segmentCondition, $idSites);
}
}
示例3: configure
public function configure(WidgetsList $widgetsList)
{
$category = 'Referrers_Referrers';
$controller = 'Referrers';
$widgetsList->add($category, 'Referrers_WidgetKeywords', $controller, 'getKeywords');
$widgetsList->add($category, 'Referrers_WidgetExternalWebsites', $controller, 'getWebsites');
$widgetsList->add($category, 'Referrers_WidgetSocials', $controller, 'getSocials');
$widgetsList->add($category, 'Referrers_SearchEngines', $controller, 'getSearchEngines');
$widgetsList->add($category, 'Referrers_Campaigns', $controller, 'getCampaigns');
$widgetsList->add($category, 'General_Overview', $controller, 'getReferrerType');
$widgetsList->add($category, 'Referrers_WidgetGetAll', $controller, 'getAll');
if (SettingsPiwik::isSegmentationEnabled()) {
$widgetsList->add('SEO', 'Referrers_WidgetTopKeywordsForPages', $controller, 'getKeywordsForPage');
}
}
示例4: init
public function init()
{
if (SettingsPiwik::isSegmentationEnabled()) {
$this->addWidget('Referrers_WidgetTopKeywordsForPages', 'getKeywordsForPage');
}
}
示例5: configure
public static function configure(WidgetConfig $config)
{
$config->setCategoryId('SEO');
$config->setName('Referrers_WidgetTopKeywordsForPages');
$config->setIsEnabled(SettingsPiwik::isSegmentationEnabled());
}