本文整理汇总了PHP中Assetic\Asset\AssetInterface::clearFilters方法的典型用法代码示例。如果您正苦于以下问题:PHP AssetInterface::clearFilters方法的具体用法?PHP AssetInterface::clearFilters怎么用?PHP AssetInterface::clearFilters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assetic\Asset\AssetInterface
的用法示例。
在下文中一共展示了AssetInterface::clearFilters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: clearFilters
/**
* {@inheritdoc}
*/
public function clearFilters()
{
if ($this->innerAsset) {
$this->innerAsset->clearFilters();
return;
}
$this->filters->clear();
}
示例2: clearFilters
/**
* Clears all filters from the current asset.
*/
public function clearFilters()
{
$this->asset->clearFilters();
}
示例3: cleanFilters
/**
* Clean filters, remove css-rewrite filter and inherit collection filters.
*
* @param AssetInterface $asset The asset.
* @param array $inheritedFilters The inherited filters.
*
* @return void
*/
private function cleanFilters(AssetInterface $asset, array $inheritedFilters)
{
// remove css-rewrite filter
$filters = $asset->getFilters();
$asset->clearFilters();
foreach ($filters as $filter) {
if (!$filter instanceof CssRewriteFilter) {
$asset->ensureFilter($filter);
}
}
// inherit filters
foreach ($inheritedFilters as $filter) {
if (!$filter instanceof CssRewriteFilter) {
$asset->ensureFilter($filter);
}
}
}