public function publishType($type)
    {
        $publish = true;

        if ($type instanceof Type and $type->getName() !== 'home' and $type->getName() !== 'menu') {
            if ($type->isPublish()) {
                $publish = false;
            }

            $type->setPublish($publish);
            $this->manager->persist($type);
            $this->manager->flush();
        }

        return $publish;
    }