@EXT\Route("/mail/layout", name="claro_admin_mail_layout")
@EXT\Template
@SEC\PreAuthorize("canOpenAdminTool('platform_parameters')")

@return \Symfony\Component\HttpFoundation\Response
320920
public function mailLayoutFormAction()
    {
        $form = $this->formFactory->create(
            new AdminForm\MailLayoutType(),
            $this->mailManager->getMailLayout()
        );

        return array('form' => $form->createView());
    }
342654
public function indexAction()
    {
        $visibilityService = $this->getVisibilityService();
        $options = $visibilityService->getOptions();

        $widgetId = $options->getWidgetId();
        if (! $widgetId) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The widget identifier was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/layout')
                ->setStatusCode(303);
        }

        $widget = $this->deriveWidget($widgetId);
        if (empty($widget)) {
            return $this->getResponse();
        }
        if ($this->getRequest()->isPost()) {
            $event = $this->request->getPost('suboperation');
            if (! empty($event)) {
                $events = $this->getEventManager();
                $params = $this->getRequest()->getPost();
                $params['widget_id'] = $widget->getId();
                $result = $events->trigger($event, $this, $params);
                if ($result->last() instanceof Response) {
                    return $result->last();
                }
            }
        }

        $view = new ViewModel;
        $view->options = $options;
        $view->widget = $widget;

        $moduleOptions = $this->getModuleOptions();
        $view->config = $moduleOptions->getWidgetByName($widget->getName());

        $view->list = $visibilityService->getContentList();
        $visibilityService->saveOptions();

        return $view;
    }
74092
public function buildTemplateAction()
    {
        $action = [
            'type' => ActionType::POSTBACK,
            'label' => $this->label,
            'data' => $this->data,
        ];

        if (isset($this->displayText)) {
            // If text is set, append extend field.
            $action['displayText'] = $this->displayText;
        }

        return $action;
    }
1104674
public function adminRender()
    {
        /** @var TAdminUI $page */
        $page = Eresus_Kernel::app()->getPage();
        $result = '';
        if (arg('update'))
        {
            $this->update();
        }
        elseif (arg('toggle'))
        {
            $this->toggle(arg('toggle', 'int'));
        }
        elseif (arg('delete'))
        {
            $this->delete(arg('delete', 'int'));
        }
        elseif (arg('id'))
        {
            $result = $this->edit();
        }
        elseif (arg('action'))
        {
            switch (arg('action'))
            {
                case 'create':
                    $result = $this->create();
                    break;
                case 'insert':
                    $this->insert();
                    break;
            }
        }
        else
        {
            $result = $page->renderTable($this->table);
        }
        return $result;
    }
176682
public function submitAction()
    {
        $localeManager = $this->container->get('claroline.common.locale_manager');
        $availableLocales = $localeManager->getImplementedLocales();
        $activatedLocales = $localeManager->retrieveAvailableLocales();
        $form = $this->createForm(new InternationalizationType($activatedLocales, $availableLocales));
        $form->handleRequest($this->get('request'));

        if ($form->isValid()) {
            $data = $form->get('locales')->getData();
            $this->container->get('claroline.config.platform_config_handler')->setParameter('locales', $data);

            return new RedirectResponse($this->get('router')->generate('claro_admin_parameters_index'));
        }

       return $this->render(
           'ClarolineCoreBundle:Administration:Internationalization\form.html.twig',
           array('form' => $form->createView(), 'product' => $product)
       );
    }
809122
public function getPlatformsAction()
    {
        $platformTable = $this->getServiceLocator()->get('MelisCoreTablePlatform');
        $translator = $this->getServiceLocator()->get('translator');
        
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');
        $melisTool->setMelisToolKey(self::TOOL_INDEX, self::TOOL_KEY);
        
        $colId = array();
        $dataCount = 0;
        $draw = 0;
        $tableData = array();
        
        if($this->getRequest()->isPost()) {
        
            $colId = array_keys($melisTool->getColumns());
        
            $sortOrder = $this->getRequest()->getPost('order');
            $sortOrder = $sortOrder[0]['dir'];
        
            $selCol = $this->getRequest()->getPost('order');
            $selCol = $colId[$selCol[0]['column']];
        
            $draw = $this->getRequest()->getPost('draw');
        
            $start = $this->getRequest()->getPost('start');
            $length =  $this->getRequest()->getPost('length');
        
            $search = $this->getRequest()->getPost('search');
            $search = $search['value'];
        
            $dataCount = $platformTable->getTotalData();
        
            $getData = $platformTable->getPagedData(array(
                'where' => array(
                    'key' => 'plf_id',
                    'value' => $search,
                ),
                'order' => array(
                    'key' => $selCol,
                    'dir' => $sortOrder,
                ),
                'start' => $start,
                'limit' => $length,
                'columns' => $melisTool->getSearchableColumns(),
                'date_filter' => array()
            ));
        
            $tableData = $getData->toArray();
            for($ctr = 0; $ctr < count($tableData); $ctr++)
            {
                // apply text limits
                foreach($tableData[$ctr] as $vKey => $vValue)
                {
                    $tableData[$ctr][$vKey] = $melisTool->limitedText($vValue);
                }
                
                // Updating marketplace status
                $marketPlaceIconn = '<i class="fa fa-fw fa-circle text-success"></i>';
                if (!$tableData[$ctr]['plf_update_marketplace'])
                {
                    $marketPlaceIconn = '<i class="fa fa-fw fa-circle text-danger"></i>';
                }
                $tableData[$ctr]['plf_update_marketplace'] = $marketPlaceIconn;
                
                // Adding class flag to remove the delete button of the current Platform
                if (getenv('MELIS_PLATFORM') == $tableData[$ctr]['plf_name']){
                    $tableData[$ctr]['DT_RowClass'] = 'noPlatformDeleteBtn';
                }
                
                // add DataTable RowID, this will be added in the <tr> tags in each rows
                $tableData[$ctr]['DT_RowId'] = $tableData[$ctr]['plf_id'];
            }
        }
        
        return new JsonModel(array(
            'draw' => (int) $draw,
            'recordsTotal' => $dataCount,
            'recordsFiltered' =>  $platformTable->getTotalFiltered(),
            'data' => $tableData,
        ));
    }
843689
public function indexAction()
    {
        $em = $this->getDoctrineManager();

        $sakonninTemplates = $em->getRepository('BisonLabSakonninBundle:SakonninTemplate')->findAll();

        return $this->render('BisonLabSakonninBundle:SakonninTemplate:index.html.twig',
            array( 'sakonninTemplates' => $sakonninTemplates,));
    }
834971
public function index()
    {
        $leftandmain = Injector::inst()->create(LeftAndMain::class);

        $form = $this->Form();
        $form->setTemplate($leftandmain->getTemplatesWithSuffix('_EditForm'));
        $form->addExtraClass('cms-edit-form center cms-content');
        $form->setAttribute('data-pjax-fragment', 'CurrentForm Content');
        
        if ($this->request->isAjax()) {
            $response = new HTTPResponse(
                Convert::raw2json(array('Content' => $form->forAjaxTemplate()->getValue()))
            );
            $response->addHeader('X-Pjax', 'Content');
            $response->addHeader('Content-Type', 'text/json');
            $response->addHeader('X-Title', 'SilverStripe - Bulk ' . $this->gridField->list->dataClass . ' Editing');

            return $response;
        } else {
            $controller = $this->getToplevelController();
            return $controller->customise(array('Content' => $form));
        }
    }
167302
public function createAction()
	{
		$cntl = $this->createAdmin();

		if( ( $html = $cntl->create() ) == '' ) {
			return $this->setPsrResponse( $cntl->getView()->response() );
		}

		$this->view->assign( 'content', $html );
	}
59304
public function layout(): array
    {
        return [
            UserEditLayout::class,
            UserRoleLayout::class,

            Layout::modals([
                'password' => Layout::rows([
                    Password::make('password')
                        ->title(__('Password'))
                        ->required()
                        ->placeholder(__('Enter your password')),
                ]),
            ]),
        ];
    }
735702
public function adminIndex()
    {
        $config = [
            'title'       => trans('HCACL::acl_access.page_title'),
            'roles'       => $this->getRolesWithPermissions(),
            'permissions' => $this->getAllPermissions(),
            'updateUrl'   => route('admin.api.acl.access.update'),
        ];

        return view('HCACL::admin.roles', ['config' => $config]);
    }
1350685
public function typesAction()
    {
        $types = $this->manager->getTypes();

        $response = $this->render(
            'ClarolineCoreBundle:home:home.html.twig',
            [
                'type' => '_pages',
                'region' => $this->renderRegions($this->manager->getRegionContents()),
                'content' => $this->render(
                    'ClarolineCoreBundle:home:types.html.twig',
                    ['types' => $types, 'hasCustomTemplates' => $this->homeService->hasCustomTemplates()]
                )->getContent(),
            ]
        );
        $response->headers->addCacheControlDirective('no-cache', true);
        $response->headers->addCacheControlDirective('max-age', 0);
        $response->headers->addCacheControlDirective('must-revalidate', true);
        $response->headers->addCacheControlDirective('no-store', true);
        $response->headers->addCacheControlDirective('expires', '-1');

        return $response;
    }
249841
public function httpResponse()
    {
        // get the template
        $template = $this->view()->getTemplate();

        // if there is no template, then we return false
        if(empty($template)) {
            return false;
        }

        // get view data
        $viewData = $this->view()->getAssignedData();

        // assign application data to view
        $viewData['App'] = [
            'Config'       => $this->getEnvironmentConfig(),
            'Components'   => $this->environment->getComponentConfigs()->toArray(),
            'Environment'  => $this->getEnvironmentName(),
            'AbsolutePath' => $this->getAbsolutePath(),
            'WebPath'      => $this->getWebPath()
        ];

        // render the view and assign it to the response object
        return new Response($this->getTemplateEngineInstance()->fetch($this->view()->getTemplate(), $viewData));
    }
985962
public function headerLanguageAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        return $view;
    }
74623
public function sendDatasConfirmAction()
    {
        $ds = DIRECTORY_SEPARATOR;
        $platformOptionsFile = $this->container->getParameter('kernel.root_dir') .
            $ds . 'config' . $ds . 'platform_options.yml';

        if (is_null($this->configHandler->getParameter('token'))) {
            $token = $this->generateToken(20);
            $this->configHandler->setParameter('token', $token);
        }
        $this->sendDatas();

        $this->configHandler->setParameter('confirm_send_datas', 'OK');

        return new RedirectResponse(
            $this->router->generate('claro_admin_parameters_index')
        );
    }
1091933
public function indexAction()
    {
        $footerContentId = $this->container->getParameter('ezdemo.footer.content_id');
        $footerContent = $this->getRepository()->getContentService()->loadContent($footerContentId);

        $response = new Response();
        $response->setPublic();
        $response->setSharedMaxAge(86400);
        $response->headers->set('X-Location-Id', $footerContent->contentInfo->mainLocationId);
        $response->setVary('X-User-Hash');

        return $this->render(
            'eZDemoBundle::page_footer.html.twig',
            array('content' => $footerContent),
            $response
        );
    }
901163
public function getAction()
	{
		$cntl = $this->createAdmin();

		if( ( $html = $cntl->get() ) == '' ) {
			return $this->setPsrResponse( $cntl->getView()->response() );
		}

		$this->view->assign( 'content', $html );
	}