Created
September 16, 2016 02:40
-
-
Save thagler/d7c47a2aa5d2ba3fe113afcc69995489 to your computer and use it in GitHub Desktop.
Revisions
-
Tobby Hagler revised this gist
Sep 16, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ <?php $path = \Drupal::service('path.alias_manager')->getPathByAlias('/this-is-the-alias'); if(preg_match('/node\/(\d+)/', $path, $matches)) { $node = \Drupal\node\Entity\Node::load($matches[1]); -
Tobby Hagler created this gist
Sep 16, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ $path = \Drupal::service('path.alias_manager')->getPathByAlias('/this-is-the-alias'); if(preg_match('/node\/(\d+)/', $path, $matches)) { $node = \Drupal\node\Entity\Node::load($matches[1]); }