Beispiel #1
0
 public static function addValue($objectId, $metaKey, $metaValue)
 {
     $objectMeta = ObjectMeta::getMeta($objectId, $metaKey);
     if (!isset($objectMeta) || $objectMeta->meta_value != $metaValue) {
         $objectMeta = new ObjectMeta();
         $objectMeta->object_id = $objectId;
     }
     $objectMeta->meta_key = $metaKey;
     $objectMeta->meta_value = $metaValue;
     return $objectMeta->save();
 }