Habari\Block::update PHP Метод

update() публичный Метод

Update this block in the database
public update ( ) : boolean | null
Результат boolean | null True on success, null if the update isn't allowed
    public function update()
    {
        $allow = true;
        $allow = Plugins::filter('block_update_allow', $allow, $this);
        if (!$allow) {
            return null;
        }
        Plugins::act('block_update_before', $this);
        $this->data = serialize($this->data_values);
        $result = parent::updateRecord(DB::table('blocks'), array('id' => $this->id));
        $this->fields = array_merge($this->fields, $this->newfields);
        $this->newfields = array();
        Plugins::act('block_update_after', $this);
        return $result;
    }