本文整理匯總了PHP中Y::metodos方法的典型用法代碼示例。如果您正苦於以下問題:PHP Y::metodos方法的具體用法?PHP Y::metodos怎麽用?PHP Y::metodos使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Y
的用法示例。
在下文中一共展示了Y::metodos方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionHome
public function actionHome()
{
if (Yii::app()->params['debug']) {
Y::metodos();
}
if (!Yii::app()->user->isGuest) {
$online = Yii::app()->db->createCommand($sql = '
SELECT
usuario.nome,
usuario.matricula,
usuario.email,
usuario.telefone,
orgao.id,
orgao.nome AS "Órgão"
FROM
usuario AS usuario
INNER JOIN
sic_orgao AS orgao
ON
usuario.orgao_id = orgao.id AND usuario.online = 1;
')->queryAll();
switch (Yii::app()->user->perfil) {
case 'agencia':
$this->redirect(array('marketing/mkrBriefing/index'));
//Yii::app()->setTheme('');
break;
case 'Jornalismo':
$this->redirect(array('subscritores/'));
break;
case 'Disparador':
$this->redirect(array('subscritores/index'));
break;
case 'sic':
$this->redirect(array('sic/'));
break;
}
$ocorrenciasPendentes = Yii::app()->db->createCommand($sql = '
select * from ocorrencia WHERE tramitacao = 0 ORDER BY prioridade DESC;
')->queryAll();
$this->render('dashboard', array('online' => $online, 'ocorrenciasPendentes' => $ocorrenciasPendentes));
} else {
$this->render('login');
}
}