Ejemplo n.º 1
0
 public function actionIndex($id = null)
 {
     if ($id != null) {
         $instruction = $this->loadModelOr404('Instruction', $id);
         $relations = Instruction::model()->findAll('id_instruction IN (SELECT id_instruction_rel FROM da_instruction_rel WHERE id_instruction=:id)', array(':id' => $instruction->id_instruction));
         $this->render('backend.extensions.instruction.views.view', array('instruction' => $instruction, 'rels' => $relations));
         return;
     }
     $this->render('backend.extensions.instruction.views.index', array('list' => Instruction::model()->findAll()));
 }