public function updateMeta($key, $newValue, $oldValue = false)
    {
        $meta = $this->getMeta($key, null, true);

        if ($meta == null) {
            return $this->addMeta($key, $newValue);
        }

        $obj = $this->getEditableItem($meta, $oldValue);

        if ($obj !== false) {
            $isSaved = $obj->update([
                'value' => $newValue
            ]);

            return $isSaved ? $obj : $obj->getErrors();
        }

        return null;
    }
public function updateMeta($key, $newValue, $oldValue = false)
    {
        $meta = $this->getMeta($key, null, true);

        if ($meta == null) {
            return $this->addMeta($key, $newValue);
        }

        $obj = $this->getEditableItem($meta, $oldValue);

        if ($obj !== false) {
            $isSaved = $obj->update([
                'value' => $newValue
            ]);

            return $isSaved ? $obj : $obj->getErrors();
        }

        return null;
    }
public function updateMeta ( $ key , $ newValue , $ oldValue = false ) { $ meta = $ this -> getMeta ( $ key , null , true ) ; if ( $ meta == null ) { return $ this -> addMeta ( $ key , $ newValue ) ; } $ obj = $ this -> getEditableItem ( $ meta , $ oldValue ) ; if ( $ obj !== false ) { $ isSaved = $ obj -> update ( [ 'value' => $ newValue ] ) ; return $ isSaved ? $ obj : $ obj -> getErrors ( ) ; } return null ; }
Updates meta data

@return mixed
Updates meta data