concrete/src/Block/Block.php
public function update($data)
    {
        $db = Loader::db();
        $dh = Loader::helper('date');
        $bDateModified = $dh->getOverridableNow();
        $bID = $this->getBlockID();

        $v = [$bDateModified, $bID];
        $q = 'update Blocks set bDateModified = ? where bID = ?';

        $r = $db->prepare($q);
        $res = $db->execute($r, $v);

        $this->refreshBlockOutputCache();

        $btID = $this->getBlockTypeID();
        $bt = BlockType::getByID($btID);
        $class = $bt->getBlockTypeClass();
        $app = Facade::getFacadeApplication();
        $bc = $app->build($class, [$this]);
        $bc->save($data);
    }
public function update($data)
    {
        $db = Loader::db();
        $dh = Loader::helper('date');
        $bDateModified = $dh->getOverridableNow();
        $bID = $this->getBlockID();

        $v = [$bDateModified, $bID];
        $q = 'update Blocks set bDateModified = ? where bID = ?';

        $r = $db->prepare($q);
        $res = $db->execute($r, $v);

        $this->refreshBlockOutputCache();

        $btID = $this->getBlockTypeID();
        $bt = BlockType::getByID($btID);
        $class = $bt->getBlockTypeClass();
        $app = Facade::getFacadeApplication();
        $bc = $app->build($class, [$this]);
        $bc->save($data);
    }
public function update ( $ data ) { $ db = Loader :: db ( ) ; $ dh = Loader :: helper ( 'date' ) ; $ bDateModified = $ dh -> getOverridableNow ( ) ; $ bID = $ this -> getBlockID ( ) ; $ v = [ $ bDateModified , $ bID ] ; $ q = 'update Blocks set bDateModified = ? where bID = ?' ; $ r = $ db -> prepare ( $ q ) ; $ res = $ db -> execute ( $ r , $ v ) ; $ this -> refreshBlockOutputCache ( ) ; $ btID = $ this -> getBlockTypeID ( ) ; $ bt = BlockType :: getByID ( $ btID ) ; $ class = $ bt -> getBlockTypeClass ( ) ; $ app = Facade :: getFacadeApplication ( ) ; $ bc = $ app -> build ( $ class , [ $ this ] ) ; $ bc -> save ( $ data ) ; }
Updates fields common to every block.

@param array $data the block type-specific data to be saved
Updates fields common to every block .