for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\DataFixtures;
use Chamilo\CoreBundle\Entity\PageCategory;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
class PageFixtures extends Fixture
{
public function load(ObjectManager $manager): void
/** @var User $admin */
$admin = $this->getReference(AccessUserFixtures::ADMIN_USER_REFERENCE);
$category = (new PageCategory())
->setTitle('home')
->setType('grid')
->setCreator($admin)
;
$manager->persist($category);
$manager->flush();
}