public function TwigEnvironment::updateCompiledTemplate

Compile the source and write the compiled template to disk.

1 call to TwigEnvironment::updateCompiledTemplate()
TwigEnvironment::loadTemplate in drupal/core/lib/Drupal/Core/Template/TwigEnvironment.php
Implements Twig_Environment::loadTemplate().

File

drupal/core/lib/Drupal/Core/Template/TwigEnvironment.php, line 57
Definition of Drupal\Core\Template\TwigEnvironment.

Class

TwigEnvironment
A class that defines a Twig environment for Drupal.

Namespace

Drupal\Core\Template

Code

public function updateCompiledTemplate($cache_filename, $name) {
  $source = $this->loader
    ->getSource($name);
  $compiled_source = $this
    ->compileSource($source, $name);
  $this
    ->storage()
    ->save($cache_filename, $compiled_source);

  // Save the last modification time
  $cid = 'twig:' . $cache_filename;
  $this->cache_object
    ->set($cid, REQUEST_TIME);
}