Craft\NeoService::_getBlockTypeRecord PHP Метод

_getBlockTypeRecord() приватный Метод

If the block type is just newly created, a fresh record will be returned.
private _getBlockTypeRecord ( Neo_BlockTypeModel $blockType ) : Neo_BlockTypeRecord
$blockType Neo_BlockTypeModel
Результат Neo_BlockTypeRecord
    private function _getBlockTypeRecord(Neo_BlockTypeModel $blockType)
    {
        if (!$blockType->isNew()) {
            $blockTypeId = $blockType->id;
            if (!isset($this->_blockTypeRecordsById) || !array_key_exists($blockTypeId, $this->_blockTypeRecordsById)) {
                $this->_blockTypeRecordsById[$blockTypeId] = Neo_BlockTypeRecord::model()->findById($blockTypeId);
                if (!$this->_blockTypeRecordsById[$blockTypeId]) {
                    throw new Exception(Craft::t('No block type exists with the ID “{id}”.', ['id' => $blockTypeId]));
                }
            }
            return $this->_blockTypeRecordsById[$blockTypeId];
        }
        return new Neo_BlockTypeRecord();
    }