/** * Apply change. * * @param MenuInterface $menu Menu * @param string $stage Stage * * @return $this Self object */ public function applyChange(MenuInterface $menu, $stage) { $menuBuilders = $this->getElementsByMenuCodeAndStage($menu->getCode(), $stage); /** * @var MenuBuilderInterface $menuBuilder */ foreach ($menuBuilders as $menuBuilder) { $menuBuilder->build($menu); } return $this; }
/** * Apply change. * * @param MenuInterface $menu Menu * @param string $stage Stage * * @return $this Self object */ public function applyChange(MenuInterface $menu, $stage) { $menu->setSubnodes($this->applyFiltersToMenuNodes($menu->getSubnodes(), $menu->getCode(), $stage)); return $this; }
/** * Save menu configuration to memory. * * @param MenuInterface $menu Menu loaded and processed * * @return $this Self object */ private function saveToMemory(MenuInterface $menu) { $this->menus[$menu->getCode()] = $menu; return $this; }