本文整理匯總了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);
}
}
}