public function addBlockType(BlockTypeEntity $bt)
    {
        if (!$this->contains($bt)) {
            $app = Application::getFacadeApplication();
            $db = $app->make(Connection::class);
            $displayOrder = $db->fetchColumn('select max(displayOrder) from BlockTypeSetBlockTypes where btsID = ?', [$this->getBlockTypeSetID()]);
            if ($displayOrder === null) {
                $displayOrder = 0;
            } else {
                ++$displayOrder;
            }
            $db->insert(
                'BlockTypeSetBlockTypes',
                [
                    'btsID' => $this->getBlockTypeSetID(),
                    'btID' => $bt->getBlockTypeID(),
                    'displayOrder' => $displayOrder,
                ]
            );
        }
    }