Action for viewing content with ng_landing_page content type identifier.

@return \Symfony\Component\HttpFoundation\Response|\Netgen\Bundle\EzPlatformSiteApiBundle\View\ContentView
193243
public function viewNgLandingPage(ContentView $view)
    {
        $location = $view->getSiteLocation();
        if (!$location instanceof Location) {
            $location = $view->getSiteContent()->mainLocation;
        }

        $response = $this->checkCategoryRedirect($location);
        if ($response instanceof Response) {
            return $response;
        }

        return $view;
    }
978027
public function getTemplateIdentifier()
    {
        $options = $this->options;
        $contentView = $this->contentView;
        $twig = $this->twig;
        $layout = $this->configResolver->getParameter('view_default_layout', 'ezpublish_legacy');

        return static function (array $params) use ($options, $contentView, $twig, $layout) {
            $contentViewClosure = $contentView->getTemplateIdentifier();
            if (isset($params['noLayout']) && $params['noLayout']) {
                $layout = $options['viewbaseLayout'];
            }
            $twigContentTemplate = <<<EOT
{% extends "{$layout}" %}

{% block {$options['contentBlockName']} %}
{{ viewResult|raw }}
{% endblock %}
EOT;

            return $twig->render(
                $twigContentTemplate,
                $params + [
                    'viewResult' => $contentViewClosure($params),
                ]
            );
        };
    }
341569
public function selectLayoutTypeAction()
    {
        $contentTypes = $this->get('opifer.content.content_type_manager')->getRepository()->findAll();

        if (!$contentTypes) {
            return $this->redirectToRoute('opifer_cms_layout_create');
        }

        return $this->render($this->getParameter('opifer_content.content_select_layout_type'), [
            'content_types' => $contentTypes,
        ]);
    }
842052
public function display()
    {
        \http_response_code($this->getResponseCode());
        if ($this->contentType) {
            header('Content-Type: ' . $this->contentType);
        }
        //        header('Content-Length: ' . strlen($this->content));
        if ($this->redirection) {
            header('Location: ' . $this->redirection);
        }
        Events::dispatch('beforeResponseSend', array($this));
        session_write_close();
        print $this->content;
        Profiler::dump();
        Events::dispatch('afterResponseSend', array($this));
    }
646183
public function pageAction()
    {
        $path = $this->params()->fromRoute('path');
        $page = $this->queryService->findPublishedPageByPath(trim($path, '/'));

        if ($page instanceof NullPage) {
            /** @var Response $response */
            $response = $this->getResponse();
            $response->setStatusCode(Response::STATUS_CODE_404);
            return null;
        }

        return new ViewModel(array('page' => $page));
    }
731131
public function menuAction()
    {
        $params     = $this->params();
        $navigation = $this->getServiceLocator()
                           ->get( 'Grid\Menu\Model\Menu\Model' )
                           ->findNavigation( $params->fromRoute( 'id' ) );

        $view = new ViewModel( array(
            'navigation' => $navigation,
        ) );

        $this->getResponse()
             ->getHeaders()
             ->addHeaderLine( 'Content-Type', 'application/xml' );

        return $view->setTerminal( true );
    }
616831
public function getContentType()
		{

			foreach (self::$contentTypeMap as $ct => $type) {
				if ($type == $this->type) {
					return $ct;
				}
			}
			return false;

		}
1020854
public function getContentType() {
        if (!isset($this->metadata[OSSHeaders::CONTENT_TYPE])) {
            return null;
        }
        return $this->metadata[OSSHeaders::CONTENT_TYPE];
    }
594538
public function indexAction()
    {
        $extractedDoc = $this->get('kreta_simple_api_doc.extractor.api_doc_extractor')->all();
        $htmlContent = $this->get('nelmio_api_doc.formatter.html_formatter')->format($extractedDoc);

        return new Response($htmlContent, 200, ['Content-Type' => 'text/html']);
    }
1106905
public function getContent()
    {
        // Check that the current user has permission to access this controller
        if (!app('decoy.user')->can('read', $this->controller)) {
            return;
        }

        // If in a sidebar and there is no parent (like if you are on a create page)
        // then don't show a special message
        if ($this->layout == 'sidebar' && !$this->parent_item) {
            return View::make('decoy::shared.list._pending', [
                'title' => $this->label_text,
                'description' => $this->controller->description(),
            ])->render();
        }

        // Get the listing of items
        $items = $this->getItems();

        // Get an instance of a model to call non-static methods on
        $model_class = $this->controller->model();
        $model_instance = new $model_class;

        // Create all the vars the standard list expects
        $vars = [
            'controller'        => $this->controller_name,
            'title'             => $this->label_text,
            'description'       => $this->controller->description(),
            'columns'           => $this->getColumns($this->controller),
            'search'            => $this->controller->search(),
            'convert_dates'     => 'date',
            'layout'            => $this->layout,
            'parent_id'         => null,
            'parent_controller' => null,
            'many_to_many'      => false,
            'listing'           => $items,
            'count'             => is_a($items, LengthAwarePaginator::class) ?
                $items->total() : $items->count(),
            'paginator_from'    => (request('page', 1)-1) * $this->perPage(),
            'with_trashed'      => $this->controller->withTrashed(),
            'is_exportable'     => $model_instance->isExportable(),
        ];

        // If the listing has a parent, add relationship vars
        if ($this->parent_item) {
            $vars = array_merge($vars, $this->controller->autocompleteViewVars());
        }

        // Return the view, passing in a bunch of variables
        return View::make('decoy::shared.list._standard', $vars)->render();
    }
519352
public function content() {
    $config = $this->config('openy.terms_and_conditions.schema');
    $timestamp = $config->get('accepted_version');
    $content = $this->t('Terms and Conditions were not accepted');

    // Is accepted.
    if ($timestamp) {
      $date = $this->dateFormatter
        ->format($timestamp, 'custom', 'F d, Y', 'UTC');
      $time = $this->dateFormatter
        ->format($timestamp, 'custom', 'H:i:s', 'UTC');
      $content = $this->t(
        'Terms and Conditions were accepted on @date at @time time UTC',
        [
          '@date' => $date,
          '@time' => $time,
        ]
      );
    }

    return new Response($content, 200, ['Content-Type' => 'text/plain']);
  }
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;
    }
23090
public function loginpageAction()
    {
        $view = $this->forward()->dispatch('MelisCore\Controller\PluginView',
            [
                'action' => 'generate',
                'appconfigpath' => '/meliscore_login',
                'keyview' => 'meliscore_login',
            ]);

        $background = '';
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getItem('/meliscore_login');
        if (!empty($appConfigForm['datas']['login_background'])) {
            $background = $appConfigForm['datas']['login_background'];
        }

        $schemeSvc = $this->getServiceLocator()->get('MelisCorePlatformSchemeService');
        $schemeData = $schemeSvc->getCurrentScheme();

        $bundleAsset = $this->getServiceLocator()->get('MelisAssetManagerWebPack')->getAssets();


        $this->layout()->addChild($view, 'content');

        $this->layout()->isLogin = 1;
        $this->layout()->login_background = $background;
        $this->layout()->schemes = $schemeData;
        $this->layout()->bundle = $bundleAsset;

        return $view;

    }
901163
public function getAction()
	{
		$cntl = $this->createAdmin();

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

		$this->view->assign( 'content', $html );
	}
994145
function contentActionList()
    {
        $dataType = $this->dataType();
        if ( $dataType )
        {
            return $dataType->contentActionList( $this->contentClassAttribute() );
        }
        return false;
    }
386674
public function canEditPagesAction()
    {
        $melisCoreAuth = $this->getServiceLocator()->get('MelisCoreAuth');
        $xmlRights = $melisCoreAuth->getAuthRights();
    	$rightsObj = simplexml_load_string($xmlRights);
        $sectionId = MelisCmsRightsService::MELISCMS_PREFIX_PAGES;
        if (empty($rightsObj->$sectionId->id))
            $edit = 0;
        else 
            $edit = 1;
            
        $result = array(
            'success' => 1,
            'edit' => $edit
        );
         
        return new JsonModel($result);
    }
801869
public static function getContentType() {
    if(null === self::$contentType) {
      self::$contentType = @trim($_SERVER['HTTP_CONTENT_TYPE']);
      if(!self::$contentType) {
        self::$contentType = @trim($_SERVER['CONTENT_TYPE']);
        if(!self::$contentType) {
          self::$contentType = false;
        }
      }
    }
    return self::$contentType;
  }