X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FRender%2Ftheme.api.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FRender%2Ftheme.api.php;h=754641cce75607868bbd686ed6bf1da7ec7d41f5;hp=db7a16165b80477641c3a61c178ba5fe1d1c47d0;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/lib/Drupal/Core/Render/theme.api.php b/web/core/lib/Drupal/Core/Render/theme.api.php index db7a16165..754641cce 100644 --- a/web/core/lib/Drupal/Core/Render/theme.api.php +++ b/web/core/lib/Drupal/Core/Render/theme.api.php @@ -364,7 +364,7 @@ * '#cache' => [ * 'keys' => ['entity_view', 'node', $node->id()], * 'contexts' => ['languages'], - * 'tags' => ['node:' . $node->id()], + * 'tags' => $node->getCacheTags(), * 'max-age' => Cache::PERMANENT, * ], * @endcode @@ -613,6 +613,10 @@ function hook_preprocess_HOOK(&$variables) { * hook called (in this case 'node__article') is available in * $variables['theme_hook_original']. * + * Implementations of this hook must be placed in *.module or *.theme files, or + * must otherwise make sure that the hook implementation is available at + * any given time. + * * @todo Add @code sample. * * @param array $variables @@ -694,6 +698,10 @@ function hook_theme_suggestions_alter(array &$suggestions, array $variables, $ho * hook called (in this case 'node__article') is available in * $variables['theme_hook_original']. * + * Implementations of this hook must be placed in *.module or *.theme files, or + * must otherwise make sure that the hook implementation is available at + * any given time. + * * @todo Add @code sample. * * @param array $suggestions @@ -728,7 +736,7 @@ function hook_themes_installed($theme_list) { /** * Respond to themes being uninstalled. * - * @param array $theme_list + * @param array $themes * Array containing the names of the themes being uninstalled. * * @see \Drupal\Core\Extension\ThemeHandler::uninstall()