本文整理汇总了PHP中BlockPlugin::getBlockContext方法的典型用法代码示例。如果您正苦于以下问题:PHP BlockPlugin::getBlockContext方法的具体用法?PHP BlockPlugin::getBlockContext怎么用?PHP BlockPlugin::getBlockContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlockPlugin
的用法示例。
在下文中一共展示了BlockPlugin::getBlockContext方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBlockContext
/**
* Get the block context. Overrides parent so that the plugin will be
* displayed during install.
* @return int
*/
function getBlockContext()
{
if (!Config::getVar('general', 'installed')) {
return BLOCK_CONTEXT_RIGHT_SIDEBAR;
}
return parent::getBlockContext();
}
示例2: getBlockContext
/**
* Get the block context. Overrides parent so that the plugin will be
* displayed during install.
* @return int
*/
function getBlockContext()
{
if (!Config::getVar('general', 'installed')) {
return BLOCK_CONTEXT_HOMEPAGE;
}
return parent::getBlockContext();
}
示例3: getBlockContext
/**
* @see BlockPlugin::getBlockContext()
*/
function getBlockContext()
{
$blockContext = parent::getBlockContext();
// Place the block on the left by default
// where navigation will usually be expected
// by the user.
if (!in_array($blockContext, $this->getSupportedContexts())) {
$blockContext = BLOCK_CONTEXT_LEFT_SIDEBAR;
}
return $blockContext;
}
示例4: getBlockContext
/**
* @see BlockPlugin::getBlockContext()
*/
function getBlockContext()
{
$blockContext = parent::getBlockContext();
// Place the block on the right by default.
if (!in_array($blockContext, $this->getSupportedContexts())) {
$blockContext = BLOCK_CONTEXT_SIDEBAR;
}
return $blockContext;
}