PortableInfobox/includes/resourceloader/PortableInfoboxResourceLoaderModule.php
Lens0021 5f13d93478
Add wgPortableInfoboxResponsiblyOpenCollapsed (#78)
* Add wgPortableInfoboxResponsiblyOpenCollapsed

* Cast config to bool
2022-04-16 23:48:03 -06:00

12 lines
368 B
PHP

<?php
class PortableInfoboxResourceLoaderModule extends ResourceLoaderFileModule {
/** @inheritDoc */
protected function getLessVars( ResourceLoaderContext $context ) {
$lessVars = parent::getLessVars( $context );
$lessVars[ 'responsibly-open-collapsed'] =
(bool)$this->getConfig()->get( 'PortableInfoboxResponsiblyOpenCollapsed' );
return $lessVars;
}
}