public Url::toRenderArray()
Returns the route information for a render array.
array An associative array suitable for a render array.
public function toRenderArray() { $render_array = [ '#url' => $this, '#options' => $this->getOptions(), ]; if (!$this->unrouted) { $render_array['#access_callback'] = [get_class(), 'renderAccess']; } return $render_array; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Url.php/function/Url::toRenderArray/8.1.x