I'm trying to add some custom styling to some of my backend views for a plugin I'm working on. While looking through the core modules, I see the use of the CombineAssets class. In the register method of my Plugin.php I'm trying:
CombineAssets::registerCallback(function($combiner) {
$combiner->registerBundle('~/plugins/path/to/my/less/file.less');
});
What is this supposed to do? From what I can tell, it should create a css file at ~/plugins/path/to/my/css/file.css. I'm not sure when/if this compilation is getting triggered though and I don't see any css file getting created.
Ideally, in a controller, I would use $this->addCss('/plugins/path/to/my/css/file.css') to add the compiled file. What am I doing wrong?
Last updated