Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Environment.php

function Environment::isTemplateFresh

Returns true if the template is still fresh.

Besides checking the loader for freshness information, this method also checks if the enabled extensions have not changed.

Parameters

int $time The last modification time of the cached template:

1 call to Environment::isTemplateFresh()
Environment::loadTemplate in vendor/twig/twig/src/Environment.php
Loads a template internal representation.

File

vendor/twig/twig/src/Environment.php, line 463

Class

Environment
Stores the Twig configuration and renders templates.

Namespace

Twig

Code

public function isTemplateFresh(string $name, int $time) : bool {
    return $this->extensionSet
        ->getLastModified() <= $time && $this->getLoader()
        ->isFresh($name, $time);
}
RSS feed
Powered by Drupal