diff --git a/src/TwigExtension.php b/src/TwigExtension.php
index 857d88c..b80dcb6 100644
--- a/src/TwigExtension.php
+++ b/src/TwigExtension.php
@@ -37,6 +37,7 @@ class TwigExtension extends \Twig_Extension {
       new \Twig_SimpleFunction('drupal_set_message', [$this, 'drupalSetMessage']),
       new \Twig_SimpleFunction('drupal_title', [$this, 'drupalTitle']),
       new \Twig_SimpleFunction('drupal_url', [$this, 'drupalUrl']),
+      new \Twig_SimpleFunction('drupal_link', [$this, 'drupalLink']),
     ];
   }
 
@@ -352,23 +353,54 @@ class TwigExtension extends \Twig_Extension {
   }
 
   /**
-   * Generates a URL from internal path.
+   * Generates a URL from an internal path.
    *
    * @param string $user_input
    *   User input for a link or path.
    * @param array $options
    *   (optional) An array of options.
+   * @param boolean $check_access
+   *   (optional) if you want the url to be returned if the current user has
+   *   access to it.
    *
    * @return \Drupal\Core\Url
    *   A new Url object based on user input.
    *
    * @see \Drupal\Core\Url::fromUserInput()
    */
-  public function drupalUrl($user_input, array $options = []) {
+  public function drupalUrl($user_input, array $options = [], $check_access = FALSE) {
     if (!in_array($user_input[0], ['/', '#', '?'])) {
       $user_input = '/' . $user_input;
     }
-    return Url::fromUserInput($user_input, $options);
+    $url = Url::fromUserInput($user_input, $options);
+    if (!$check_access || $url->access()) {
+      return $url;
+    }
+  }
+
+ /**
+   * Generates a link from an internal path.
+   *
+   * @param string $text
+   *   The text to be used for the link
+   * @param string $user_input
+   *   User input for a link or path.
+   * @param array $options
+   *   (optional) An array of options.
+   * @param boolean $check_access
+   *   (optional) if you want the url to be returned if the current user has
+   *   access to it.
+   *
+   * @return \Drupal\Core\Link
+   *   A new Link object
+   *
+   * @see \Drupal\Core\Link::fromTextAndUrl()
+   */
+  public function drupalLink($text, $user_input, array $options = [], $check_access = FALSE) {
+    $url = $this->drupalUrl($user_input, $options, $check_access);
+    if ($url) {
+      return \Drupal\Core\Link::fromTextAndUrl($text, $url);
+    }
   }
 
   /**
