示例#1
0
 public function run()
 {
     Organigrama::create(array('OrganigramaURL' => 'images\\organigrama\\Direccion.png'));
     Organigrama::create(array('OrganigramaURL' => 'images\\organigrama\\Tecnica.png'));
     Organigrama::create(array('OrganigramaURL' => 'images\\organigrama\\Posgrado.png'));
     Organigrama::create(array('OrganigramaURL' => 'images\\organigrama\\Vinculacion.png'));
     Organigrama::create(array('OrganigramaURL' => 'images\\organigrama\\Administrativa.png'));
     Organigrama::create(array('OrganigramaURL' => 'images\\organigrama\\Sistemas.png'));
     $this->command->info('OrganigramaTableSeeder: Organigramas cargados correctamente');
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Organigrama the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Organigrama::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }