本文整理匯總了PHP中Planning::findByAttributes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Planning::findByAttributes方法的具體用法?PHP Planning::findByAttributes怎麽用?PHP Planning::findByAttributes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Planning
的用法示例。
在下文中一共展示了Planning::findByAttributes方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: actionEditcandidate
public function actionEditcandidate()
{
$candidateID = Yii::app()->request->getParam('id');
$candidateModel = new Candidate();
$planningModel = new Planning();
$UserProfile = new UserProfile();
$editCandidate = $candidateModel->with('plannings')->findByPk($candidateID);
$editPlanning = $planningModel->findByAttributes(array('CandidateID' => $candidateID));
if (isset($_POST['Candidate'])) {
$editCandidate->attributes = $_POST['Candidate'];
$editCandidate->CandidateID = $candidateID;
//$editCandidate->UserProfileID = Yii::app()->user->userProfileID;
$editCandidate->CompanyID = Yii::app()->user->companyID;
//$candidateModel->IsActive = 1;
$editPlanning->CurrentPositionLevel = $editCandidate->CompanyPositionID;
if ($editCandidate->validate()) {
if ($editCandidate->save()) {
$editPlanning->save();
$this->redirect(Yii::app()->createUrl('company/fullcandidates'));
}
}
}
$criteria3 = new CDbCriteria();
$criteria3->condition = '(companyID = :companyID AND IsActive=1)';
$criteria3->params = array(':companyID' => Yii::app()->user->companyID);
$criteria3->order = 'Email';
$userManagers = UserProfile::model()->with('userLogin')->findAllByAttributes(array(), $criteria3);
$managersArray = array();
foreach ($userManagers as $UserManager) {
$managersArray[$UserManager->UserProfileID] = $UserManager->Email;
}
$managerArray = $managersArray;
$companyPositions = Helper::getCompanyPositions(Yii::app()->user->companyID);
$this->render('candidate-form', array('candidateModel' => $editCandidate, 'planningModel' => $planningModel, 'companyPositionSelect' => $companyPositions, 'managerArray' => $managerArray));
}