admin_ui-8.x-1.x-dev/src/Controller/VfancyController.php
src/Controller/VfancyController.php
<?php
namespace Drupal\admin_ui\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\Response;
/**
* Returns the contents of index.html as generated by Parcel.
*/
class VfancyController extends ControllerBase {
/**
* Returns the contents of dist/index.html.
*/
public function content() {
$file = file_get_contents(__DIR__ .'/../../dist/index.html');
$file = str_replace('MODULE_LOCATION', base_path() . drupal_get_path('module', 'admin_ui'), $file);
return new Response($file, 200);
}
}