public static function Url::renderAccess
public static Url::renderAccess(array $element)
Checks a Url render element against applicable access check services.
Parameters
array $element: A render element as returned from \Drupal\Core\Url::toRenderArray().
Return value
bool Returns TRUE if the current user has access to the url, otherwise FALSE.
File
- core/lib/Drupal/Core/Url.php, line 805
Class
- Url
- Defines an object that holds information about a URL.
Namespace
Drupal\CoreCode
public static function renderAccess(array $element) { return $element['#url']->access(); }
© 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::renderAccess/8.1.x