Ejemplo n.º 1
0
 /**
  * Converts link to URL.
  * @return string
  */
 public function __toString()
 {
     try {
         return $this->component->link($this->destination, $this->params);
     } catch (\Exception $e) {
         Nette\Diagnostics\Debugger::toStringException($e);
     }
 }
Ejemplo n.º 2
0
 /**
  * Converts link to URL.
  * @return string
  */
 public function __toString()
 {
     try {
         return (string) $this->component->link($this->destination, $this->params);
     } catch (\Exception $e) {
         trigger_error("Exception in " . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR);
     }
 }
Ejemplo n.º 3
0
 /**
  * Converts link to URL.
  * @return string
  */
 public function __toString()
 {
     try {
         return (string) $this->component->link($this->destination, $this->params);
     } catch (\Throwable $e) {
     } catch (\Exception $e) {
     }
     if (isset($e)) {
         if (func_num_args()) {
             throw $e;
         }
         trigger_error("Exception in " . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR);
     }
 }
Ejemplo n.º 4
0
 /**
  * @param \Nette\Application\UI\PresenterComponent $component
  * @param string $destination
  * @param array $args
  */
 public function onLink(PresenterComponent $component, $destination, array $args = [])
 {
     $component->link($destination, $args);
     if ($request = $component->getPresenter()->lastCreatedRequest) {
         return $this->onPresenter($request);
     }
 }
Ejemplo n.º 5
0
 /**
  * @return string
  */
 public function getUrl()
 {
     return NULL === ($param = $this->getParam()) ? $this->presenterComponent->link($this->destination) : $this->presenterComponent->link($this->destination, $param);
 }