Skip to content

Instantly share code, notes, and snippets.

@luksak
Last active June 5, 2018 09:47

Revisions

  1. Lukas von Blarer renamed this gist Jun 5, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Lukas von Blarer renamed this gist Jun 5, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions THEME.theme.php → THEME.theme
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    /*
    * Implements hook_preprocess_HOOK().
    */
  3. Lukas von Blarer renamed this gist Jun 5, 2018. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions gistfile1.txt → THEME.theme.php
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,3 @@


    /*
    * Implements hook_preprocess_HOOK().
    */
  4. Lukas von Blarer created this gist Jun 5, 2018.
    9 changes: 9 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@


    /*
    * Implements hook_preprocess_HOOK().
    */
    function THEME_preprocess_node(&$variables) {
    $url = Url::fromRoute('entity.node.canonical', array('node' => $variables['node']->id()));
    $variables['url'] = $url;
    }