| @@ 57-77 (lines=21) @@ | ||
| 54 | * @Route("/%eccube_admin_route%/content/block", name="admin_content_block") |
|
| 55 | * @Template("@admin/Content/block.twig") |
|
| 56 | */ |
|
| 57 | public function index(Request $request) |
|
| 58 | { |
|
| 59 | $DeviceType = $this->deviceTypeRepository |
|
| 60 | ->find(DeviceType::DEVICE_TYPE_PC); |
|
| 61 | ||
| 62 | // 登録されているブロック一覧の取得 |
|
| 63 | $Blocks = $this->blockRepository->getList($DeviceType); |
|
| 64 | ||
| 65 | $event = new EventArgs( |
|
| 66 | [ |
|
| 67 | 'DeviceType' => $DeviceType, |
|
| 68 | 'Blocks' => $Blocks, |
|
| 69 | ], |
|
| 70 | $request |
|
| 71 | ); |
|
| 72 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_CONTENT_BLOCK_INDEX_COMPLETE, $event); |
|
| 73 | ||
| 74 | return [ |
|
| 75 | 'Blocks' => $Blocks, |
|
| 76 | ]; |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * @Route("/%eccube_admin_route%/content/block/new", name="admin_content_block_new") |
|
| @@ 72-91 (lines=20) @@ | ||
| 69 | * @Route("/%eccube_admin_route%/content/page", name="admin_content_page") |
|
| 70 | * @Template("@admin/Content/page.twig") |
|
| 71 | */ |
|
| 72 | public function index(Request $request) |
|
| 73 | { |
|
| 74 | $DeviceType = $this->deviceTypeRepository |
|
| 75 | ->find(DeviceType::DEVICE_TYPE_PC); |
|
| 76 | ||
| 77 | $Pages = $this->pageRepository->getPageList($DeviceType); |
|
| 78 | ||
| 79 | $event = new EventArgs( |
|
| 80 | [ |
|
| 81 | 'DeviceType' => $DeviceType, |
|
| 82 | 'Pages' => $Pages, |
|
| 83 | ], |
|
| 84 | $request |
|
| 85 | ); |
|
| 86 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_CONTENT_PAGE_INDEX_COMPLETE, $event); |
|
| 87 | ||
| 88 | return [ |
|
| 89 | 'Pages' => $Pages, |
|
| 90 | ]; |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * @Route("/%eccube_admin_route%/content/page/new", name="admin_content_page_new") |
|