/** * @param $id * @throws CHttpException */ public function actionMatchClients($id) { $instruction = Deal::model()->findByPk($id); if (!$instruction) { throw new CHttpException('404', 'Instruction [id: ' . $id . '] not found'); } $this->layout = '//layouts/adminDefault'; $model = new Client('instruction-matching'); $criteria = $model->getDbCriteria(); $criteria->compare('cli_saleemail', 'yes'); $this->render('matchClients', ['model' => $model, 'instruction' => $instruction]); }