Пример #1
0
 /**
  * Update cache definition procedure
  *
  * @param afsWidgetModel $widget
  * @return Widget
  * @author Sergey Startsev
  */
 public function update($widget)
 {
     if ($widget->isNew()) {
         return $this;
     }
     $method_name = 'process' . ucfirst(strtolower($widget->getType()));
     if (method_exists($this, $method_name)) {
         $this->definition[$widget->getPlace()][$widget->getModule()][$widget->getAction()] = call_user_func(array($this, $method_name), $widget->getDefinition());
     }
     return $this;
 }