コード例 #1
0
 /**
  * @return \Admin\Content\MenuGrid
  */
 protected function createGrid()
 {
     $grid = $this->gridFactory->create($this->getSectionId());
     $grid->onClickLeft[] = function ($id, $sectionId) {
         $menuMover = $this->menuMoverFactory->create($sectionId);
         $menuMover->left($id);
         $this->processDirectionClick($id);
     };
     $grid->onClickRight[] = function ($id, $sectionId) {
         $menuMover = $this->menuMoverFactory->create($sectionId);
         $menuMover->right($id);
         $this->processDirectionClick($id);
     };
     $grid->onClickUp[] = function ($id, $sectionId) {
         $menuMover = $this->menuMoverFactory->create($sectionId);
         $menuMover->up($id);
         $this->processDirectionClick($id);
     };
     $grid->onClickDown[] = function ($id, $sectionId) {
         $menuMover = $this->menuMoverFactory->create($sectionId);
         $menuMover->down($id);
         $this->processDirectionClick($id);
     };
     return $grid;
 }
コード例 #2
0
 public function edit(Form $form)
 {
     $this->menuFacade->edit($this->id, $form['base']->getValues());
     $menuMover = $this->menuMoverFactory->create($this->sectionId);
     $this->saveCommon($this->id, $form, $menuMover);
 }