Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit | Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit | ||||
Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section | Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section | ||||
Lc\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site | Lc\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site | ||||
Lc\CaracoleBundle\Model\Site\NewsInterface: App\Entity\Site\News | |||||
Lc\CaracoleBundle\Model\Site\PageInterface: App\Entity\Site\Page | |||||
Lc\SovBundle\Model\Site\NewsInterface: App\Entity\Site\News | |||||
Lc\SovBundle\Model\Site\PageInterface: App\Entity\Site\Page | |||||
Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket | Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket | ||||
Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage | Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage | ||||
Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant | Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant |
use App\Entity\Merchant\Merchant; | use App\Entity\Merchant\Merchant; | ||||
use App\Entity\PointSale\PointSale; | use App\Entity\PointSale\PointSale; | ||||
use App\Entity\Section\Section; | use App\Entity\Section\Section; | ||||
use App\Entity\Site\News; | |||||
use App\Entity\Site\Page; | use App\Entity\Site\Page; | ||||
use App\Entity\Ticket\Ticket; | use App\Entity\Ticket\Ticket; | ||||
use App\Entity\User\GroupUser; | use App\Entity\User\GroupUser; | ||||
yield MenuItem::linkToCrud('tickets', 'far fa-copy', Ticket::class); | yield MenuItem::linkToCrud('tickets', 'far fa-copy', Ticket::class); | ||||
yield MenuItem::linkToCrud('pointsale', 'far fa-circle', PointSale::class); | yield MenuItem::linkToCrud('pointsale', 'far fa-circle', PointSale::class); | ||||
yield MenuItem::linkToCrud('page', 'far fa-copy', Page::class); | yield MenuItem::linkToCrud('page', 'far fa-copy', Page::class); | ||||
yield MenuItem::linkToCrud('news', 'far fa-circle', News::class); | |||||
yield MenuItem::subMenu('user', 'far fa-user')->setSubItems( | yield MenuItem::subMenu('user', 'far fa-user')->setSubItems( | ||||
[ | [ | ||||
MenuItem::linkToCrud('user_merchant_index', '', UserMerchant::class), | MenuItem::linkToCrud('user_merchant_index', '', UserMerchant::class), |
<?php | |||||
namespace App\Controller\Site; | |||||
use App\Entity\Site\News; | |||||
use Lc\CaracoleBundle\Controller\Site\NewsAdminController as CaracNewsAdminController; | |||||
class NewsAdminController extends CaracNewsAdminController | |||||
{ | |||||
public static function getEntityFqcn(): string | |||||
{ | |||||
return News::class; | |||||
} | |||||
} |
namespace App\Controller\Site; | namespace App\Controller\Site; | ||||
use App\Entity\Site\Page; | use App\Entity\Site\Page; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||||
use Lc\CaracoleBundle\Controller\Site\PageAdminController as CaracPageAdminController; | |||||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | |||||
use Lc\SovBundle\Controller\AbstractAdminController; | |||||
use Lc\SovBundle\Field\CKEditorField; | |||||
use Lc\SovBundle\Field\ImageManagerField; | |||||
use Lc\SovBundle\Field\StatusField; | |||||
class PageAdminController extends AbstractAdminController | |||||
class PageAdminController extends CaracPageAdminController | |||||
{ | { | ||||
use AdminControllerTrait; | |||||
public static function getEntityFqcn(): string | public static function getEntityFqcn(): string | ||||
{ | { | ||||
return Page::class; | return Page::class; | ||||
} | } | ||||
public function configureFields(string $pageName): iterable | |||||
{ | |||||
$panel = parent::configureFields($pageName); | |||||
return array_merge( | |||||
[ | |||||
FormField::addPanel('general'), | |||||
TextField::new('title'), | |||||
ImageManagerField::new('image'), | |||||
NumberField::new('position')->hideOnForm(), | |||||
StatusField::new('status'), | |||||
CKEditorField::new('description'), | |||||
], | |||||
$panel | |||||
); | |||||
} | |||||
} | } |
namespace App\Entity\Site; | namespace App\Entity\Site; | ||||
use Lc\CaracoleBundle\Repository\Site\NewsRepository; | |||||
use Lc\SovBundle\Repository\Site\NewsRepository; | |||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; | ||||
use Lc\CaracoleBundle\Model\Site\NewsInterface; | |||||
use Lc\CaracoleBundle\Model\Site\NewsModel; | use Lc\CaracoleBundle\Model\Site\NewsModel; | ||||
/** | /** | ||||
* @ORM\Entity(repositoryClass=NewsRepository::class) | * @ORM\Entity(repositoryClass=NewsRepository::class) | ||||
*/ | */ | ||||
class News extends NewsModel implements NewsInterface | |||||
class News extends NewsModel | |||||
{ | { | ||||
/** | /** | ||||
* @ORM\Id | * @ORM\Id |
namespace App\Entity\Site; | namespace App\Entity\Site; | ||||
use Lc\CaracoleBundle\Model\Site\PageModel; | use Lc\CaracoleBundle\Model\Site\PageModel; | ||||
use Lc\CaracoleBundle\Repository\Site\PageRepository; | |||||
use Lc\SovBundle\Repository\Site\PageRepository; | |||||
use Doctrine\Common\Collections\ArrayCollection; | use Doctrine\Common\Collections\ArrayCollection; | ||||
use Doctrine\Common\Collections\Collection; | use Doctrine\Common\Collections\Collection; | ||||
use Doctrine\ORM\Mapping as ORM; | use Doctrine\ORM\Mapping as ORM; |