本文整理匯總了PHP中x2base::actionView方法的典型用法代碼示例。如果您正苦於以下問題:PHP x2base::actionView方法的具體用法?PHP x2base::actionView怎麽用?PHP x2base::actionView使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類x2base
的用法示例。
在下文中一共展示了x2base::actionView方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionView
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id) {
$model=$this->loadModel($id);
$model->assignedTo=UserChild::getUserLinks($model->assignedTo);
$type='project';
parent::actionView($model,$type);
}
示例2: actionView
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id) {
$type = 'sales';
$model = $this->loadModel($id);
$model->assignedTo = UserChild::getUserLinks($model->assignedTo);
$model->associatedContacts = ContactChild::getContactLinks($model->associatedContacts);
parent::actionView($model, $type);
}
示例3: actionView
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id) {
$model=$this->loadModel($id);
$model->assignedTo=UserChild::getUserLinks($model->assignedTo);
$str = '';
$contacts=ContactChild::model()->findAllByAttributes(array('company'=>$model->name));
foreach($contacts as $contact){
$str.=$contact->id.' ';
}
$model->associatedContacts=$str;
$model->associatedContacts=ContactChild::getContactLinks($model->associatedContacts);
$type='accounts';
parent::actionView($model, $type);
}
示例4: actionView
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id) {
$type='templates';
$model=$this->loadModel($id);
parent::actionView($model, $type);
}
示例5: actionView
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id) {
$contact = $this->loadModel($id);
if ($contact->assignedTo == Yii::app()->user->getName()
|| $contact->visibility == 1
|| Yii::app()->user->getName() == 'admin') {
UserChild::addRecentItem('c',$id,Yii::app()->user->getId()); ////add contact to user's recent item list
parent::actionView($contact, 'contacts');
} else
$this->redirect('index');
}