You are here

protected function GeshiFilterFilter::tags in GeSHi Filter for syntax highlighting 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Filter/GeshiFilterFilter.php \Drupal\geshifilter\Plugin\Filter\GeshiFilterFilter::tags()

Get the tags for this filter.

Return value

string A string with the tags for this filter.

2 calls to GeshiFilterFilter::tags()
GeshiFilterFilter::generalHighlightTagsSettings in src/Plugin/Filter/GeshiFilterFilter.php
Helper function for some settings form fields.
GeshiFilterFilter::getTags in src/Plugin/Filter/GeshiFilterFilter.php
Helper function for gettings the tags.

File

src/Plugin/Filter/GeshiFilterFilter.php, line 482

Class

GeshiFilterFilter
Provides a base filter for Geshi Filter.

Namespace

Drupal\geshifilter\Plugin\Filter

Code

protected function tags() {
  if (!$this->config
    ->get('use_format_specific_options')) {

    // We do not want per filter tags, so get the global tags.
    return $this->config
      ->get('tags');
  }
  else {
    if (isset($this->settings['general_tags']['tags'])) {

      // Tags are set for this format.
      return $this->settings['general_tags']['tags'];
    }
    else {

      // Tags are not set for this format, so use the global ones.
      return $this->config
        ->get('tags');
    }
  }
}