concrete/src/Block/BlockType/Set.php
public static function getByID($btsID)
    {
        $result = null;
        $btsID = (int) $btsID;
        if ($btsID !== 0) {
            $app = Application::getFacadeApplication();
            $cache = $app->make('cache/request');
            $identifier = sprintf('block/type/set/%s', $btsID);
            $item = $cache->getItem($identifier);
            if ($item->isMiss()) {
                $item->lock();
                $db = $app->make(Connection::class);
                $row = $db->fetchAssoc('select btsID, btsHandle, pkgID, btsName from BlockTypeSets where btsID = ?', [$btsID]);
                if ($row !== false) {
                    $result = new static();
                    $result->setPropertiesFromArray($row);
                }
                $item->set($result)->save();
            } else {
                $result = $item->get();
            }
        }

        return $result;
    }
public static function getByID($btsID)
    {
        $result = null;
        $btsID = (int) $btsID;
        if ($btsID !== 0) {
            $app = Application::getFacadeApplication();
            $cache = $app->make('cache/request');
            $identifier = sprintf('block/type/set/%s', $btsID);
            $item = $cache->getItem($identifier);
            if ($item->isMiss()) {
                $item->lock();
                $db = $app->make(Connection::class);
                $row = $db->fetchAssoc('select btsID, btsHandle, pkgID, btsName from BlockTypeSets where btsID = ?', [$btsID]);
                if ($row !== false) {
                    $result = new static();
                    $result->setPropertiesFromArray($row);
                }
                $item->set($result)->save();
            } else {
                $result = $item->get();
            }
        }

        return $result;
    }
public static function getByID ( $ btsID ) { $ result = null ; $ btsID = ( int ) $ btsID ; if ( $ btsID !== 0 ) { $ app = Application :: getFacadeApplication ( ) ; $ cache = $ app -> make ( 'cache/request' ) ; $ identifier = sprintf ( 'block/type/set/%s' , $ btsID ) ; $ item = $ cache -> getItem ( $ identifier ) ; if ( $ item -> isMiss ( ) ) { $ item -> lock ( ) ; $ db = $ app -> make ( Connection :: class ) ; $ row = $ db -> fetchAssoc ( 'select btsID, btsHandle, pkgID, btsName from BlockTypeSets where btsID = ?' , [ $ btsID ] ) ; if ( $ row !== false ) { $ result = new static ( ) ; $ result -> setPropertiesFromArray ( $ row ) ; } $ item -> set ( $ result ) -> save ( ) ; } else { $ result = $ item -> get ( ) ; } } return $ result ; }
Get a block type set given its ID.

@param int $btsID

@return static|null
Get a block type set given its ID .