@@ -47,8 +47,8 @@ doctrine: | |||
Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit | |||
Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section | |||
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\TicketMessageInterface: App\Entity\Ticket\TicketMessage | |||
Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant |
@@ -7,6 +7,7 @@ use App\Entity\Config\Unit; | |||
use App\Entity\Merchant\Merchant; | |||
use App\Entity\PointSale\PointSale; | |||
use App\Entity\Section\Section; | |||
use App\Entity\Site\News; | |||
use App\Entity\Site\Page; | |||
use App\Entity\Ticket\Ticket; | |||
use App\Entity\User\GroupUser; | |||
@@ -26,6 +27,7 @@ class DashboardAdminController extends CaracDashboardController | |||
yield MenuItem::linkToCrud('tickets', 'far fa-copy', Ticket::class); | |||
yield MenuItem::linkToCrud('pointsale', 'far fa-circle', PointSale::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( | |||
[ | |||
MenuItem::linkToCrud('user_merchant_index', '', UserMerchant::class), |
@@ -0,0 +1,14 @@ | |||
<?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; | |||
} | |||
} |
@@ -3,41 +3,12 @@ | |||
namespace App\Controller\Site; | |||
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 | |||
{ | |||
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 | |||
); | |||
} | |||
} |
@@ -2,15 +2,14 @@ | |||
namespace App\Entity\Site; | |||
use Lc\CaracoleBundle\Repository\Site\NewsRepository; | |||
use Lc\SovBundle\Repository\Site\NewsRepository; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\CaracoleBundle\Model\Site\NewsInterface; | |||
use Lc\CaracoleBundle\Model\Site\NewsModel; | |||
/** | |||
* @ORM\Entity(repositoryClass=NewsRepository::class) | |||
*/ | |||
class News extends NewsModel implements NewsInterface | |||
class News extends NewsModel | |||
{ | |||
/** | |||
* @ORM\Id |
@@ -3,7 +3,7 @@ | |||
namespace App\Entity\Site; | |||
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\Collection; | |||
use Doctrine\ORM\Mapping as ORM; |