murph-skeleton/core/Factory/Site/MenuFactory.php

27 lines
503 B
PHP
Raw Normal View History

2021-03-24 12:27:07 +01:00
<?php
namespace App\Core\Factory\Site;
use App\Core\Entity\Site\Menu;
use App\Core\Entity\Site\Navigation;
2021-05-12 10:17:39 +02:00
use App\Core\Factory\FactoryInterface;
2021-03-24 12:27:07 +01:00
/**
* class MenuFactory.
*
* @author Simon Vieille <simon@deblan.fr>
*/
2021-05-12 10:17:39 +02:00
class MenuFactory implements FactoryInterface
2021-03-24 12:27:07 +01:00
{
public function create(?Navigation $navigation = null): Menu
{
$entity = new Menu();
if (null !== $navigation) {
$entity->setNavigation($navigation);
}
return $entity;
}
}