コード例 #1
0
ファイル: Widget.php プロジェクト: cbsistem/appflower_studio
 /**
  * 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;
 }