示例#1
0
 /**
  * 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
 /**
  * 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
 /**
  * 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;
 }