本文整理汇总了PHP中CPortlet::init方法的典型用法代码示例。如果您正苦于以下问题:PHP CPortlet::init方法的具体用法?PHP CPortlet::init怎么用?PHP CPortlet::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPortlet
的用法示例。
在下文中一共展示了CPortlet::init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
if ($this->products === null) {
throw new CException(Shop::t('Please provide a product that can be bought with the ImageUploadWidget'));
}
return parent::init();
}
示例2: init
public function init()
{
$assets = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../assets');
$clientScript = Yii::app()->clientScript;
$clientScript->registerCssFile($assets . '/widget-widget.css');
parent::init();
}
示例3: init
/**
* Class object initialization
*/
public function init()
{
$this->title = Yii::t('comments', 'CommentsTitle');
$this->decorationCssClass = "portlet-header";
$this->titleCssClass = "portlet-title";
parent::init();
}
示例4: init
public function init()
{
if (!$this->dialogMode) {
$this->title = Yii::t('CalModule.fullCal', 'Events list');
}
parent::init();
}
示例5: init
public function init()
{
$this->title = Yii::t('portlet', 'EmailNotificationsTitle');
$this->decorationCssClass = "portlet-header";
$this->titleCssClass = "portlet-title";
parent::init();
}
示例6: init
public function init()
{
if (!Shop::getCartContent()) {
return false;
}
return parent::init();
}
示例7: init
public function init()
{
if ($this->title === NULL) {
$this->title = Yum::t('Login');
}
parent::init();
}
示例8: init
/**
* Class object initialization
*/
public function init()
{
$this->title = CHtml::image(Yii::app()->request->baseUrl . '/images/portlets/overdue.png') . " " . Yii::t('portlet', 'UpcomingMilestonesTitle');
$this->decorationCssClass = "portlet-header";
$this->titleCssClass = "portlet-title";
parent::init();
}
示例9: init
public function init()
{
$this->title = Yum::t('Profile Comments');
if (Yii::app()->user->isGuest) {
return false;
}
parent::init();
}
示例10: init
public function init()
{
if (Yum::module('message')->messageSystem === false) {
return false;
}
$this->title = Yum::t('New messages');
parent::init();
}
示例11: init
public function init()
{
$this->hideOnEmpty = true;
$controllerId = Yii::app()->controller;
if (method_exists($controllerId, 'getSubMenu')) {
$this->menu = $controllerId->getSubMenu();
}
parent::init();
}
示例12: init
/**
* Initializes the portlet.
*/
public function init()
{
$assets = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../assets');
$clientScript = Yii::app()->clientScript;
$clientScript->registerCssFile($assets . '/poll.css');
$this->_poll = $this->poll_id == 0 ? Poll::model()->latest()->find() : Poll::model()->findByPk($this->poll_id);
if ($this->_poll) {
$this->title = $this->_poll->title;
}
parent::init();
}
示例13: init
/**
* Initializes the portlet.
*/
public function init()
{
// Set the poll module (also kicks in the CSS via the module init)
$this->_module = Yii::app()->getModule('poll');
$this->attachBehavior('pollBehavior', 'poll.behaviors.PollBehavior');
$this->_poll = $this->poll_id == 0 ? Poll::model()->with('choices', 'votes', 'totalVotes')->latest()->find() : Poll::model()->with('choices', 'votes', 'totalVotes')->findByPk($this->poll_id);
if ($this->_poll) {
$this->title = $this->_poll->title;
}
parent::init();
}
示例14: init
public function init()
{
if (!Yum::module('profile')->enableProfileVisitLogging) {
return false;
}
$this->title = Yum::t('Profile visits');
if (Yii::app()->user->isGuest) {
return false;
}
parent::init();
}
示例15: init
public function init()
{
$this->htmlOptions['class'] = 'dashboard-portlet';
$this->decorationCssClass = 'dashboard-portlet-header';
$this->titleCssClass = 'dashboard-portlet-title';
$this->contentCssClass = 'dashboard-portlet-content';
$this->title = $this->getTitle();
$this->id = $this->getClassName();
if (!$this->visible) {
$this->htmlOptions['class'] .= ' dashboard-portlet-invisible';
}
parent::init();
}