public function run() { if ($this->widgetManager->layoutManager->staticLayout) { return; } // hide widget if journal view is disabled if (!Yii::app()->params->profile->miscLayoutSettings['enableJournalView']) { $this->registerSharedCss(); $this->render('application.components.sortableWidget.views.' . $this->sharedViewFile, array('widgetClass' => get_called_class(), 'profile' => $this->profile, 'hidden' => true, 'widgetUID' => $this->widgetUID)); return; } parent::run(); }
public function run() { $credentials = $this->getTwitterCredentials(); if (!$credentials) { return ''; } if (!extension_loaded('curl')) { $this->addError(Yii::t('app', 'The Twitter widget requires the PHP curl extension.')); return parent::run(); } else { $aliases = $this->getModelTwitterAliases(); if (!count($aliases)) { return ''; } if (isset($_GET['twitterScreenName'])) { $this->_username = $_GET['twitterScreenName']; } else { $this->_username = $aliases[0]->alias; } try { $this->getTweetDataProvider(); } catch (TwitterFeedWidgetException $e) { $errorMessage = $e->getMessage(); if (isset($_GET['twitterFeedAjax'])) { throw new CHttpException(429, $errorMessage); } else { $this->addError($errorMessage); } } } return parent::run(); }
public function run() { $credentials = $this->getTwitterCredentials(); if (!$credentials) { return ''; } $aliases = $this->getModelTwitterAliases(); if (!count($aliases)) { return ''; } if (isset($_GET['twitterScreenName'])) { $this->_username = $_GET['twitterScreenName']; } else { $this->_username = $aliases[0]->alias; } return parent::run(); }
public function run() { $credentials = $this->getTwitterCredentials(); if (!$credentials) { return ''; } if (!extension_loaded('curl')) { $this->addError(Yii::t('app', 'The Twitter widget requires the PHP curl extension.')); return parent::run(); } else { $aliases = $this->getModelTwitterAliases(); if (!count($aliases)) { return ''; } if (isset($_GET['twitterScreenName'])) { $this->_username = $_GET['twitterScreenName']; } else { $this->_username = $aliases[0]->alias; } } return parent::run(); }