Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AssetOptimizerInterface.php

interface AssetOptimizerInterface

Interface defining a service that optimizes an asset.

Hierarchy

  • interface \Drupal\Core\Asset\AssetOptimizerInterface

Expanded class hierarchy of AssetOptimizerInterface

All classes that implement AssetOptimizerInterface

File

core/lib/Drupal/Core/Asset/AssetOptimizerInterface.php, line 8

Namespace

Drupal\Core\Asset
View source
interface AssetOptimizerInterface {
    
    /**
     * Optimizes an asset.
     *
     * @param array $asset
     *   An asset.
     *
     * @return string
     *   The optimized asset's contents.
     */
    public function optimize(array $asset);
    
    /**
     * Removes unwanted content from an asset.
     *
     * @param string $content
     *   The content of an asset.
     *
     * @return string
     *   The cleaned asset's contents.
     */
    public function clean($content);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
AssetOptimizerInterface::clean public function Removes unwanted content from an asset. 2
AssetOptimizerInterface::optimize public function Optimizes an asset. 2
RSS feed
Powered by Drupal