Beispiel #1
0
 /**
  * @param string $name
  */
 public function setNameAndBrand($name)
 {
     $this->name = $name;
     $this->menu->setBrand($name);
 }
Beispiel #2
0
 private function initMenu(Menu $menu)
 {
     $menu->add(new ActionMenuItem('Write Post', 'writePost'));
     $menu->add(new ActionMenuItem('All Posts', 'listPosts'));
     $menu->add((new MenuGroup('Authors'))->add(new ActionMenuItem('Register Author', MethodActionGenerator::actionId(Authors::class, 'register')))->add(new ActionMenuItem('All Authors', MethodActionGenerator::actionId(Authors::class, 'all'))));
     return $this;
 }
Beispiel #3
0
 private function whenIRenderTheMenu()
 {
     $this->rendered = (string) $this->menu->render();
 }
Beispiel #4
0
 private function whenIRenderTheMenu()
 {
     $this->rendered = (string) $this->menu->render(new WebRequest(Url::fromString('http://example.com/base'), new Path()));
 }