private function GeshiFilterFilter::languageTags in GeSHi Filter for syntax highlighting 8
Same name and namespace in other branches
- 8.2 src/Plugin/Filter/GeshiFilterFilter.php \Drupal\geshifilter\Plugin\Filter\GeshiFilterFilter::languageTags()
Get the tags for a language.
Parameters
string $language: The language to get the tags(ex: php, html, ...).
Return value
string The tags for the language(ex: [php],[php5],...).
1 call to GeshiFilterFilter::languageTags()
- GeshiFilterFilter::getTags in src/
Plugin/ Filter/ GeshiFilterFilter.php - Helper function for gettings the tags.
File
- src/
Plugin/ Filter/ GeshiFilterFilter.php, line 647
Class
- GeshiFilterFilter
- Provides a base filter for Geshi Filter.
Namespace
Drupal\geshifilter\Plugin\FilterCode
private function languageTags($language) {
if (!$this->config
->get('use_format_specific_options')) {
return $this->config
->get("language.{$language}.tags");
}
else {
$settings = $this->settings["per_language_settings"]['table']['language'];
if (isset($settings[$language]["tags"])) {
// Tags are set for this language.
return $settings[$language]["tags"];
}
else {
// Tags are not set for this language, so use the global ones.
return $this->config
->get("language.{$language}.tags");
}
}
}