protected function LibraryPattern::templateExists in UI Patterns 8
Weather template exists in given directory.
Parameters
string $directory: Directory full path.
string $template: Template name, without default Twig extension.
Return value
bool Weather template exists in given directory.
1 call to LibraryPattern::templateExists()
- LibraryPattern::processCustomThemeHookProperty in modules/
ui_patterns_library/ src/ Plugin/ UiPatterns/ Pattern/ LibraryPattern.php - Process 'custom hook theme' definition property.
File
- modules/
ui_patterns_library/ src/ Plugin/ UiPatterns/ Pattern/ LibraryPattern.php, line 98
Class
- LibraryPattern
- The UI Pattern plugin.
Namespace
Drupal\ui_patterns_library\Plugin\UiPatterns\PatternCode
protected function templateExists($directory, $template) {
return file_exists($directory . DIRECTORY_SEPARATOR . $template . '.html.twig');
}