mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-16 04:22:37 +00:00
19 lines
623 B
PHP
19 lines
623 B
PHP
<?php
|
|
|
|
class PortableInfoboxBuilderController extends WikiaController {
|
|
|
|
const INFOBOX_BUILDER_PARAM = 'portableInfoboxBuilder';
|
|
|
|
public function getAssets() {
|
|
$dir = PortableInfoboxRenderService::getTemplatesDir();
|
|
$result = array_map( function ( $template ) use ( $dir ) {
|
|
return file_get_contents( "{$dir}/{$template}" );
|
|
}, PortableInfoboxRenderService::getTemplates() );
|
|
|
|
$response = $this->getResponse();
|
|
$response->setFormat( WikiaResponse::FORMAT_JSON );
|
|
$response->setVal( "css", AssetsManager::getInstance()->getURL( "portable_infobox_scss" ) );
|
|
$response->setVal( "templates", $result );
|
|
}
|
|
}
|