function StringLoader::exists

Same name in other branches
  1. 9 core/lib/Drupal/Core/Template/Loader/StringLoader.php \Drupal\Core\Template\Loader\StringLoader::exists()
  2. 8.9.x core/lib/Drupal/Core/Template/Loader/StringLoader.php \Drupal\Core\Template\Loader\StringLoader::exists()
  3. 11.x core/lib/Drupal/Core/Template/Loader/StringLoader.php \Drupal\Core\Template\Loader\StringLoader::exists()

File

core/lib/Drupal/Core/Template/Loader/StringLoader.php, line 31

Class

StringLoader
Loads string templates, also known as inline templates.

Namespace

Drupal\Core\Template\Loader

Code

public function exists($name) {
    if (str_starts_with($name, '{# inline_template_start #}')) {
        return TRUE;
    }
    else {
        return FALSE;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.