public function filterSetPortlets($filterChain){ if(!Yii::app()->user->isGuest){ $this->portlets=array(); $this->portlets = ProfileChild::getWidgets(); // $this->portlets=array(); // $arr=ProfileChild::getWidgets(Yii::app()->user->getId()); // foreach($arr as $key=>$value){ // $config=ProfileChild::parseWidget($value,$key); // $this->portlets[$key]=$config; // } } $filterChain->run(); }
/** * Sets widgets on the page on a per user basis. */ public function filterSetPortlets($filterChain) { $this->portlets = ProfileChild::getWidgets(); // foreach($widgets as $key=>$value) { // $options = ProfileChild::parseWidget($value,$key); // $this->portlets[$key] = $options; // } $filterChain->run(); }
/** * Sets widgets on the page on a per user basis. */ public function filterSetPortlets($filterChain) { $themeURL = Yii::app()->theme->getBaseUrl(); Yii::app()->clientScript->registerScript('logos', "\n\t\t\t\$(window).load(function(){\n\t\t\t\tif((!\$('#main-menu-icon').length) || (!\$('#x2touch-logo').length) || (!\$('#x2crm-logo').length)){\n\t\t\t\t\t\$('a').removeAttr('href');\n\t\t\t\t\talert('Please put the logo back');\n\t\t\t\t\twindow.location='http://www.x2engine.com';\n\t\t\t\t}\n\t\t\t\tvar touchlogosrc = \$('#x2touch-logo').attr('src');\n\t\t\t\tvar logosrc=\$('#x2crm-logo').attr('src');\n\t\t\t\tif(logosrc!='{$themeURL}/images/x2footer.png'|| touchlogosrc!='{$themeURL}/images/x2touch.png'){\n\t\t\t\t\t\$('a').removeAttr('href');\n\t\t\t\t\talert('Please put the logo back');\n\t\t\t\t\twindow.location='http://www.x2engine.com';\n\t\t\t\t}\n\t\t\t}); \n\t\t\t"); $this->portlets = ProfileChild::getWidgets(); // foreach($widgets as $key=>$value) { // $options = ProfileChild::parseWidget($value,$key); // $this->portlets[$key] = $options; // } $filterChain->run(); }