Ejemplo n.º 1
0
 protected function createRequest($component, $destination, array $args, $mode)
 {
     if ($destination instanceof Ytnuk\Link\Entity) {
         $component = $this;
         $args += $destination->parameters->get()->fetchPairs('key', 'value');
         $destination = $destination->destination;
         if ($args['absolute'] ?? NULL) {
             $destination = '//' . $destination;
         }
         if ($fragment = $args['fragment'] ?? NULL) {
             $destination .= '#' . $fragment;
         }
         unset($args['absolute'], $args['fragment']);
     }
     return parent::createRequest($component, $destination, $args, $mode);
 }