コード例 #1
0
ファイル: GroupConfig.php プロジェクト: rolandstoll/pimcore
 /**
  * Saves the group config
  */
 public function save()
 {
     $isUpdate = false;
     if ($this->getId()) {
         $isUpdate = true;
         \Pimcore::getEventManager()->trigger("object.keyValue.groupConfig.preUpdate", $this);
     } else {
         \Pimcore::getEventManager()->trigger("object.keyValue.groupConfig.preAdd", $this);
     }
     $model = parent::save();
     if ($isUpdate) {
         \Pimcore::getEventManager()->trigger("object.keyValue.groupConfig.postUpdate", $this);
     } else {
         \Pimcore::getEventManager()->trigger("object.keyValue.groupConfig.postAdd", $this);
     }
     return $model;
 }
コード例 #2
0
ファイル: KeyConfig.php プロジェクト: ChristophWurst/pimcore
 /**
  * Saves the key config
  */
 public function save()
 {
     DefinitionCache::clear($this);
     $isUpdate = false;
     $def = \Zend_Json::decode($this->definition);
     if ($def && isset($def["title"])) {
         $this->title = $def["title"];
     } else {
         $this->title = null;
     }
     if ($this->getId()) {
         unset(self::$cache[$this->getId()]);
         $isUpdate = true;
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.preUpdate", $this);
     } else {
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.preAdd", $this);
     }
     $model = parent::save();
     if ($isUpdate) {
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.postUpdate", $this);
     } else {
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.postAdd", $this);
     }
     return $model;
 }
コード例 #3
0
ファイル: KeyConfig.php プロジェクト: quorak/pimcore
 /**
  * Saves the key config
  */
 public function save()
 {
     DefinitionCache::clear($this);
     $isUpdate = false;
     if ($this->getId()) {
         unset(self::$cache[$this->getId()]);
         $isUpdate = true;
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.preUpdate", $this);
     } else {
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.preAdd", $this);
     }
     $model = parent::save();
     if ($isUpdate) {
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.postUpdate", $this);
     } else {
         \Pimcore::getEventManager()->trigger("object.Classificationstore.keyConfig.postAdd", $this);
     }
     return $model;
 }