You are here

public static function CustomFilterBaseFilter::getCodeVars in Custom filter 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Filter/CustomFilterBaseFilter.php \Drupal\customfilter\Plugin\Filter\CustomFilterBaseFilter::getCodeVars()

Return the global object containing the global properties.

Return the global object containing the global properties used in the replacement PHP code.

Parameters

bool $reset: Boolean value set to TRUE when the global object must be reset.

2 calls to CustomFilterBaseFilter::getCodeVars()
CustomFilterBaseFilter::process in src/Plugin/Filter/CustomFilterBaseFilter.php
Performs the filter processing.
CustomFilterBaseFilter::replaceCallback in src/Plugin/Filter/CustomFilterBaseFilter.php
Helper function for preg_replace_callback().

File

src/Plugin/Filter/CustomFilterBaseFilter.php, line 187

Class

CustomFilterBaseFilter
Provides a base filter for Custom Filter.

Namespace

Drupal\customfilter\Plugin\Filter

Code

public static function &getCodeVars($reset = FALSE) {
  static $vars;
  if (!isset($vars) || $reset) {
    $vars = new \stdClass();
  }
  return $vars;
}