public function init() { Yii::app()->clientScript->registerPackages($this->getPackages()); parent::init(); }
* You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley, * California 95067, USA. or at email address contact@x2engine.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License version 3, * these Appropriate Legal Notices must retain the display of the "Powered by * X2Engine" logo. If the display of the logo is not reasonably feasible for * technical reasons, the Appropriate Legal Notices must display the words * "Powered by X2Engine". *****************************************************************************************/ $this->beginContent('//layouts/main'); Yii::import('application.components.leftWidget.*'); LeftWidget::registerScript(); $noBackdrop = isset($this->noBackdrop) && $this->noBackdrop ? 'no-backdrop' : ''; X2Flashes::renderTopFlashes('top-error'); ?> <div id='sidebar-left-widget-box'> <?php if (!Yii::app()->user->isGuest) { $layout = Yii::app()->params->profile->getLayout(); // $defaults = array ('RecentItems', 'ActionMenu', 'TopContacts'); // default order $defaults = array('ActionMenu', 'RecentItems', 'TopContacts'); $keys = array_merge(array_keys($this->leftWidgets), $defaults); $leftWidgetOrder = array_intersect_key($layout['left'], array_flip($keys)); //Default Left Widgets; $leftWidgets = array('TopContacts' => array(), 'RecentItems' => array());