saveMetaValue() public static method

Save Meta Data of a Object Content Type
public static saveMetaValue ( type $key, type $value, type $object, type $create = true )
$key type
$value type
$object type
$create type
Esempio n. 1
0
 protected function afterSave()
 {
     parent::afterSave();
     if ($this->isNewRecord) {
         Object::saveMetaValue('price', $this->price, $this, true);
     } else {
         Object::saveMetaValue('price', $this->price, $this, false);
     }
 }
Esempio n. 2
0
 protected function afterSave()
 {
     parent::afterSave();
     if ($this->isNewRecord) {
         Object::saveMetaValue('start_date', $this->start_date, $this, true);
         Object::saveMetaValue('end_date', $this->end_date, $this, true);
     } else {
         Object::saveMetaValue('start_date', $this->start_date, $this, false);
         Object::saveMetaValue('end_date', $this->end_date, $this, false);
     }
 }