public static function CustomFilterBaseFilter::replaceCallback in Custom filter 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Filter/CustomFilterBaseFilter.php \Drupal\customfilter\Plugin\Filter\CustomFilterBaseFilter::replaceCallback()
Helper function for preg_replace_callback().
1 call to CustomFilterBaseFilter::replaceCallback()
- CustomFilterBaseFilter::applyRules in src/
Plugin/ Filter/ CustomFilterBaseFilter.php - Replace the text using rules.
File
- src/
Plugin/ Filter/ CustomFilterBaseFilter.php, line 163
Class
- CustomFilterBaseFilter
- Provides a base filter for Custom Filter.
Namespace
Drupal\customfilter\Plugin\FilterCode
public static function replaceCallback($matches, $init = FALSE) {
static $code;
if ($init) {
$code = $matches;
return;
}
$vars =& static::getCodeVars();
@eval($code);
return isset($result) ? $result : '';
}