public function index(Application $app, Request $request, $route)
{
$DeviceType = $app['orm.em']->getRepository('Eccube\\Entity\\Master\\DeviceType')->find(DeviceType::DEVICE_TYPE_PC);
$PageLayout = $app['eccube.repository.page_layout']->findOneBy(array('url' => $route, 'DeviceType' => $DeviceType, 'edit_flg' => PageLayout::EDIT_FLG_USER));
if (is_null($PageLayout)) {
throw new NotFoundHttpException();
}
// user_dataディレクトリを探索パスに追加.
$paths = array();
$paths[] = $app['config']['user_data_realdir'];
$app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
$file = $PageLayout->getFileName() . '.twig';
$event = new EventArgs(array('DeviceType' => $DeviceType, 'PageLayout' => $PageLayout, 'file' => $file), $request);
$app['eccube.event.dispatcher']->dispatch(EccubeEvents::FRONT_USER_DATA_INDEX_INITIALIZE, $event);
return $app->render($file);
}