Пример #1
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->package('vespakoen/menu', null, __DIR__ . '/../');
     $container = Menu::getContainer();
     $container['url'] = $this->app['url'];
     $container['config'] = $this->app['config'];
     Menu::setContainer($container);
 }
Пример #2
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $configPath = __DIR__ . '/../config/config.php';
     $this->mergeConfigFrom($configPath, 'menu');
     $container = Menu::getContainer();
     $container['url'] = $this->app['url'];
     $container['config'] = $this->app['config'];
     Menu::setContainer($container);
 }
Пример #3
0
 /**
  * Get the Request instance
  *
  * @return Request
  */
 public function getRequest()
 {
     return Menu::getContainer('request');
 }
Пример #4
0
 /**
  * Render the Link
  *
  * @return string
  */
 public function render()
 {
     $this->href = $this->getEvaluatedUrl();
     // Don't compote URL if special URL
     if (!$this->isSpecialUrl()) {
         $this->href = Menu::getContainer()->bound('url') ? Menu::getContainer('url')->to($this->href) : $this->href;
     }
     return parent::render();
 }