mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-14 19:31:44 +00:00
27 lines
688 B
PHP
27 lines
688 B
PHP
|
<?php
|
||
|
class PortableInfoboxHooks {
|
||
|
// FIX ME: temporary implementation - styles should be included only on page with portable infobox
|
||
|
static public function onBeforePageDisplay( OutputPage $out, Skin $skin ) {
|
||
|
Wikia::addAssetsToOutput('portable_infobox_scss');
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Adds assets on the bottom of the body tag for special maps page
|
||
|
*
|
||
|
* @param {String} $skin
|
||
|
* @param {String} $text
|
||
|
*
|
||
|
* @return bool
|
||
|
*/
|
||
|
public static function onSkinAfterBottomScripts( $skin, &$text ) {
|
||
|
$scripts = AssetsManager::getInstance()->getURL( 'portable_infobox_js' );
|
||
|
|
||
|
foreach ( $scripts as $script ) {
|
||
|
$text .= Html::linkedScript( $script );
|
||
|
}
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
}
|