public ViewExecutable::getUrlInfo($display_id = '')
Gets the Url object associated with the display handler.
Parameters
string $display_id: (optional) The display ID (used only to detail an exception).
Return value
\Drupal\Core\Url The display handlers URL object.
Throws
\InvalidArgumentException Thrown when the display plugin does not have a URL to return.
File
- core/modules/views/src/ViewExecutable.php, line 1997
Class
- ViewExecutable
- Represents a view as a whole.
Namespace
Drupal\views
Code
1 2 3 4 5 6 7 | public function getUrlInfo( $display_id = '' ) { $this ->initDisplay(); if (! $this ->display_handler instanceof DisplayRouterInterface) { throw new \InvalidArgumentException( "You cannot generate a URL for the display '$display_id'" ); } return $this ->display_handler->getUrlInfo(); } |
Please login to continue.