PartKeepr\CategoryBundle\EventListener\RootCategoryListener::ensureRootstays PHP Method

ensureRootstays() protected method

protected ensureRootstays ( AbstractCategory $category )
$category PartKeepr\CategoryBundle\Entity\AbstractCategory
    protected function ensureRootstays(AbstractCategory $category)
    {
        if ($category->getParent() === null) {
            throw new RootMayNotBeDeletedException();
        }
    }