public static function createActPrice($id)
 {
     $acts = Doctrine::getTable('Act')->createQuery('a')->execute();
     foreach ($acts as $act) {
         if (!$act->getDisabled()) {
             $newActPrice = new ActPrice();
             $newActPrice->setActId($act->getId());
             $newActPrice->setActPublicCategoryId($id);
             $newActPrice->setValue(-1);
             $newActPrice->save();
         }
     }
 }
Пример #2
0
 public function createActPrice($id)
 {
     $publicCategories = Doctrine::getTable('ActPublicCategory')->createQuery('a')->execute();
     foreach ($publicCategories as $publicCategory) {
         $newActPrice = new ActPrice();
         $newActPrice->setActId($id);
         $newActPrice->setActPublicCategoryId($publicCategory->getId());
         $newActPrice->setValue(-1);
         $newActPrice->save();
     }
 }