public function getBlockTypeById(int $blockTypeId)
    {
        if ($this->_blockTypesById !== null && array_key_exists($blockTypeId, $this->_blockTypesById)) {
            return $this->_blockTypesById[$blockTypeId];
        }

        $result = $this->_createBlockTypeQuery()
            ->where(['id' => $blockTypeId])
            ->one();

        return $this->_blockTypesById[$blockTypeId] = $result ? new SuperTableBlockTypeModel($result) : null;
    }
public function getBlockTypeById(int $blockTypeId)
    {
        if ($this->_blockTypesById !== null && array_key_exists($blockTypeId, $this->_blockTypesById)) {
            return $this->_blockTypesById[$blockTypeId];
        }

        $result = $this->_createBlockTypeQuery()
            ->where(['id' => $blockTypeId])
            ->one();

        return $this->_blockTypesById[$blockTypeId] = $result ? new SuperTableBlockTypeModel($result) : null;
    }
public function getBlockTypeById ( int $ blockTypeId ) { if ( $ this -> _blockTypesById !== null && array_key_exists ( $ blockTypeId , $ this -> _blockTypesById ) ) { return $ this -> _blockTypesById [ $ blockTypeId ] ; } $ result = $ this -> _createBlockTypeQuery ( ) -> where ( [ 'id' => $ blockTypeId ] ) -> one ( ) ; return $ this -> _blockTypesById [ $ blockTypeId ] = $ result ? new SuperTableBlockTypeModel ( $ result ) : null ; }
Returns a block type by its ID.

@param int $blockTypeId The block type ID.

@return SuperTableBlockTypeModel|null The block type, or `null` if it didn’t exist.
Returns a block type by its ID .