concrete/src/Block/Block.php
public function updateBlockInformation($data)
    {
        // this is the function that
        $db = Loader::db();
        $dh = Loader::helper('date');
        $dt = $dh->getOverridableNow();

        $bName = $this->getBlockName();
        $bFilename = $this->getBlockFilename();
        if (isset($data['bName'])) {
            $bName = $data['bName'];
        }
        if (isset($data['bFilename'])) {
            $bFilename = $data['bFilename'];
        }

        $v = [$bName, $bFilename, $dt, $this->getBlockID()];
        $q = 'update Blocks set bName = ?, bFilename = ?, bDateModified = ? where bID = ?';
        $r = $db->prepare($q);
        $res = $db->execute($r, $v);

        $this->refreshBlockOutputCache();
    }
public function updateBlockInformation($data)
    {
        // this is the function that
        $db = Loader::db();
        $dh = Loader::helper('date');
        $dt = $dh->getOverridableNow();

        $bName = $this->getBlockName();
        $bFilename = $this->getBlockFilename();
        if (isset($data['bName'])) {
            $bName = $data['bName'];
        }
        if (isset($data['bFilename'])) {
            $bFilename = $data['bFilename'];
        }

        $v = [$bName, $bFilename, $dt, $this->getBlockID()];
        $q = 'update Blocks set bName = ?, bFilename = ?, bDateModified = ? where bID = ?';
        $r = $db->prepare($q);
        $res = $db->execute($r, $v);

        $this->refreshBlockOutputCache();
    }
public function updateBlockInformation ( $ data ) { // this is the function that $ db = Loader :: db ( ) ; $ dh = Loader :: helper ( 'date' ) ; $ dt = $ dh -> getOverridableNow ( ) ; $ bName = $ this -> getBlockName ( ) ; $ bFilename = $ this -> getBlockFilename ( ) ; if ( isset ( $ data [ 'bName' ] ) ) { $ bName = $ data [ 'bName' ] ; } if ( isset ( $ data [ 'bFilename' ] ) ) { $ bFilename = $ data [ 'bFilename' ] ; } $ v = [ $ bName , $ bFilename , $ dt , $ this -> getBlockID ( ) ] ; $ q = 'update Blocks set bName = ?, bFilename = ?, bDateModified = ? where bID = ?' ; $ r = $ db -> prepare ( $ q ) ; $ res = $ db -> execute ( $ r , $ v ) ; $ this -> refreshBlockOutputCache ( ) ; }
Update the block information, like its block filename, and block name.

@param array $data Valid keys:
- 'bName' to update the block name
- 'bFilename' to update the block custom template
Update the block information like its block filename and block name .