diff --git a/modules/system/traits/AssetMaker.php b/modules/system/traits/AssetMaker.php index d62fe59f8..317768876 100644 --- a/modules/system/traits/AssetMaker.php +++ b/modules/system/traits/AssetMaker.php @@ -28,6 +28,17 @@ trait AssetMaker */ public $assetPath; + /** + * Disables the use, and subequent broadcast, of assets. This is useful + * to call during an AJAX request to speed things up. This method works + * by specifically targeting the hasAssetsDefined method. + * @return void + */ + public function clearAssetDefinitions() + { + $this->assets = ['js'=>[], 'css'=>[], 'rss'=>[]]; + } + /** * Outputs and