Ejemplo n.º 1
0
 public function init()
 {
     $this->name = "Управление агентами";
     $this->modelShowAttribute = "id";
     $this->modelClassName = CmsAgent::className();
     parent::init();
 }
Ejemplo n.º 2
0
 /**
  * Выполнить агентов
  */
 public function actionAgentsExecute()
 {
     /**
      * Поиск агентов к выполнению
      */
     $agents = CmsAgent::findForExecute()->all();
     \Yii::info('Agents execute: ' . count($agents), CmsAgent::className());
     if ($agents) {
         foreach ($agents as $agent) {
             $agent->execute();
         }
     }
 }