本文整理匯總了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());
}