class AssetOptimizationEvent in Advanced CSS/JS Aggregation 8.3
Same name and namespace in other branches
- 8.4 src/Asset/AssetOptimizationEvent.php \Drupal\advagg\Asset\AssetOptimizationEvent
AssetOptimizationEvent data holder.
Hierarchy
- class \Drupal\advagg\Asset\AssetOptimizationEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of AssetOptimizationEvent
Related topics
6 files declare their use of AssetOptimizationEvent
- CssSubscriber.php in advagg_old_ie_compatibility/
src/ EventSubscriber/ CssSubscriber.php - InitSubscriber.php in advagg_mod/
src/ EventSubscriber/ InitSubscriber.php - MinificationSubscriber.php in advagg_ext_minify/
src/ EventSubscriber/ MinificationSubscriber.php - MinificationSubscriber.php in advagg_css_minify/
src/ EventSubscriber/ MinificationSubscriber.php - MinificationSubscriber.php in advagg_js_minify/
src/ EventSubscriber/ MinificationSubscriber.php
File
- src/
Asset/ AssetOptimizationEvent.php, line 25
Namespace
Drupal\advagg\AssetView source
class AssetOptimizationEvent extends Event {
/**
* The Event ID for css optimization.
*/
const CSS = 'advagg.optimize_css';
const JS = 'advagg.optimize_js';
/**
* The asset content.
*
* @var string
*/
protected $content;
/**
* A core single asset definition array.
*
* @var array
*/
protected $asset;
/**
* A single asset advagg cache array.
*
* @var array
*/
protected $data;
/**
* AssetOptimizationEvent constructor.
*
* @param string $content
* The asset content.
* @param array $asset
* The asset core definition array.
* @param array $data
* The cache data about the asset.
*/
public function __construct($content, array $asset, array $data) {
$this->content = $content;
$this->asset = $asset;
$this->data = $data;
}
/**
* Get the current content.
*
* @return string
* The current content.
*/
public function getContent() {
return $this->content;
}
/**
* Set new content.
*
* @param string $content
* The new content.
*/
public function setContent($content) {
$this->content = $content;
}
/**
* Get the asset array.
*
* @return array
* The current core asset definition array.
*/
public function getAsset() {
return $this->asset;
}
/**
* Update the asset array.
*
* @param array $asset_array
* The updated asset definition array.
*/
public function setAsset(array $asset_array) {
$this->asset = $asset_array;
}
/**
* Get the cache data.
*
* @return array
* The current cache data array.
*/
public function getData() {
return $this->data;
}
/**
* Update the cache data.
*
* @param array $data
* The new cache data array.
*/
public function setData(array $data) {
$this->data = $data;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AssetOptimizationEvent:: |
protected | property | A core single asset definition array. | |
AssetOptimizationEvent:: |
protected | property | The asset content. | |
AssetOptimizationEvent:: |
protected | property | A single asset advagg cache array. | |
AssetOptimizationEvent:: |
constant | The Event ID for css optimization. | ||
AssetOptimizationEvent:: |
public | function | Get the asset array. | |
AssetOptimizationEvent:: |
public | function | Get the current content. | |
AssetOptimizationEvent:: |
public | function | Get the cache data. | |
AssetOptimizationEvent:: |
constant | |||
AssetOptimizationEvent:: |
public | function | Update the asset array. | |
AssetOptimizationEvent:: |
public | function | Set new content. | |
AssetOptimizationEvent:: |
public | function | Update the cache data. | |
AssetOptimizationEvent:: |
public | function | AssetOptimizationEvent constructor. |