public static function CssUtils::filterImports

Filters all CSS imports through a callable.

Parameters

string $content The CSS:

callable $callback A PHP callable:

integer $limit Limit the number of replacements:

integer $count Will be populated with the count:

Boolean $includeUrl Whether to include url() in the pattern:

Return value

string The filtered CSS

3 calls to CssUtils::filterImports()
BaseCssFilter::filterImports in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php
CssUtils::extractImports in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php
Extracts all references from the supplied CSS content.
CssUtils::filterReferences in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php
Filters all references -- url() and "@import" -- through a callable.

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php, line 71

Class

CssUtils
CSS Utils.

Namespace

Assetic\Util

Code

public static function filterImports($content, $callback, $limit = -1, &$count = 0, $includeUrl = true) {
  $pattern = $includeUrl ? static::REGEX_IMPORTS : static::REGEX_IMPORTS_NO_URLS;
  return preg_replace_callback($pattern, $callback, $content, $limit, $count);
}