This methos will render the Details of a single News

@return \Zend\View\Model\ViewModel
550113
public function detailsAction()
    {
        
        // Getting the Site config "MelisDemoCms.config.php"
        $siteConfig = $this->getServiceLocator()->get('config');
        $siteConfig = $siteConfig['site']['MelisDemoCms'];
        $siteDatas = $siteConfig['datas'];
        
        $dateMax = date("Y-m-d H:i:s", strtotime("now"));
		$listNewsPluginView = $this->MelisCmsNewsShowNewsPlugin();
		$listNewsParameters = array(
		    'id' => 'newsDetails',
		    'template_path' => 'MelisDemoCms/plugin/news-details',
		);
		// add generated view to children views for displaying it in the contact view
		$this->view->addChild($listNewsPluginView->render($listNewsParameters), 'newsDetails');
		
		/**
		 * Generating Homepage Latest News slider using MelisCmsNewsLatestNewsPlugin Plugin
		 */
		$latestNewsPluginView = $this->MelisCmsNewsLatestNewsPlugin();
		$latestNewsParameters = array(
		    'template_path' => 'MelisDemoCms/plugin/latest-news',
            'pageIdNews' => $siteDatas['news_details_page_id'],
		    'filter' => array(
		        'column' => 'cnews_publish_date',
		        'order' => 'DESC',
		        'limit' => 10,
		        'unpublish_filter' => true,
		        'date_max' => null,
		        'site_id' => $siteDatas['site_id'],
		    )
		);
		// add generated view to children views for displaying it in the contact view
		$this->view->addChild($latestNewsPluginView->render($latestNewsParameters), 'latestNews');
        
        $this->view->setVariable('renderMode', $this->renderMode);
        $this->view->setVariable('idPage', $this->idPage);
        return $this->view;
    }
1137535
public function getViewModel() {
		if ($this->useCache) {
			$viewModel = $this->recacheAgent->getViewModel('add', $this->entityNamespace, '');
			if ($viewModel) {
				return $viewModel;
			}
		}
		
		$this->viewModel = new ViewModel();
		
		$form = $this->formGenerator->getForm();
		$this->viewModel->setVariable('form', $form);
		
		if (RequestHandler::handleAdd($this->objectManager, $this->entityNamespace, $form, $this->request) && $this->redirect != null) {
			return $this->getRedirect();
		}
		
		$this->setupTemplate();
		$this->setupTitle();
		
		if ($this->useCache) {
			$this->recacheAgent->storeViewModel($this->viewModel, 'add', $this->entityNamespace, '');
		}
		
		return $this->viewModel;
	}
183156
public function actionDetail() {
        $request = Yii::$app->request;
        if (!is_null($id = $request->post('id', $request->post('expandRowKey')))) {
            $model = $this->retrieveModel($id);
            return $this->renderPartial('_detail', ['model' => $model]);
        } else {
            return '<div class="alert alert-danger">No data found</div>';
        }
    }
645997
public function renderMelisCoreGdprSearchFormAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $form = $this->getTool('meliscore', 'melis_core_gdpr_tool')->getForm('melis_core_gdpr_search_form');

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        $view->form = $form;

        return $view;
    }
21600
public function render()
    {
        // get messages
        $allMessages = [
            'danger'  => array_unique(
                array_merge(
                    $this->flashMessenger->getErrorMessages(),
                    $this->flashMessenger->getCurrentErrorMessages()
                )
            ),
            'success' => array_unique(
                array_merge(
                    $this->flashMessenger->getSuccessMessages(),
                    $this->flashMessenger->getCurrentSuccessMessages()
                )
            ),
            'warning' => array_unique(
                array_merge(
                    $this->flashMessenger->getWarningMessages(),
                    $this->flashMessenger->getCurrentWarningMessages()
                )
            ),
            'info'    => array_unique(
                array_merge(
                    $this->flashMessenger->getInfoMessages(),
                    $this->flashMessenger->getCurrentInfoMessages()
                )
            ),
            'default' => array_unique(
                array_merge(
                    $this->flashMessenger->getMessages(),
                    $this->flashMessenger->getCurrentMessages()
                )
            ),
        ];

        // clear messages
        $this->flashMessenger->clearMessagesFromContainer();
        $this->flashMessenger->clearCurrentMessagesFromContainer();

        // initialize output
        $output = '';

        // loop through messages
        foreach ($allMessages as $groupKey => $groupMessages) {
            foreach ($groupMessages as $message) {
                $addClass = $groupKey == 'default' ? '' : 'alert-' . $groupKey;

                // setup view model
                $viewModel = new ViewModel();
                $viewModel->setVariable('alertClass', $addClass);
                $viewModel->setVariable('alertMessage', $message);
                $viewModel->setTemplate('zfrapid-library/widget/bootstrap-alert');

                // add rendered output
                $output .= $this->getView()->render($viewModel);
            }
        }

        // return output
        return $output . "\n";
    }
1013656
public function render()
	{
		$format = Config::get('bauhaus::admin.date_format.time');

		if ($this->getValue() instanceof Carbon) {
			$value = $this->getValue()->format($format);
		} else {
			$value = date($format, strtotime($this->getValue()));
		}

		$this->setValue($value);

		return View::make('krafthaus/bauhaus::models.fields._time')
			->with('field', $this);
	}
317770
public function renderCalendarEditEventModalAction(){
        $melisKey = $this->params()->fromRoute('melisKey', '');
        // Get Element form for Calendar event
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisMelisCoreConfig->getFormMergedAndOrdered('meliscalendar/forms/melicalendar_event_form','melicalendar_event_form');
        // Factoring Calendar event and pass to view
        $factory = new \Zend\Form\Factory();
        $formElements = $this->serviceLocator->get('FormElementManager');
        $factory->setFormElementManager($formElements);
        $propertyForm = $factory->createForm($appConfigForm);
        // Set Calendar Event Title input non-draggable input
        $propertyForm->get('cal_event_title')->setAttribute('data-draggable', false);
        
        
        $calId = $this->params()->fromQuery('cal_id');
        
        if($calId) {
            
            $calendarTable = $this->getServiceLocator()->get('MelisCalendarTable');
             
            $resultEvent = $calendarTable->getEntryById($calId);
             
            if (!empty($resultEvent)){
                $eventData = $resultEvent->current();
                 
                if (!empty($eventData)){
                    $propertyForm->bind($eventData);
                }
            }
        }
        
        $view = new ViewModel();
        $view->setVariable('meliscalendar_event_title', $propertyForm);
        $view->melisKey = $melisKey;
        $view->calId = $calId;
        return $view;
    }
558488
public function renderToolUserContentActionDeleteAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $view = new ViewModel();
        $view->melisKey = $melisKey;

        return $view;
    }
816516
public function newSimpleOutput()
    {
        $config = $this->config->getCurrentResourceConfiguration();

        return new SimpleOutput(
            $this->newSerializer($config),
            $this->newResource($config)
        );
    }
989140
public function prevNews()
    {
        $prev = $this->newsManager()->prev();

        if (!$prev) {
            return null;
        }

        return $this->newsFormatNav($prev);
    }
155956
public function render()
	{
		$separators = $this->getSeparators();
		$this->setValue(number_format($this->getValue(), $this->getDecimals(), $separators[0], $separators[1]));

		return View::make('krafthaus/bauhaus::models.fields._number')
			->with('field', $this);
	}
366202
public function getNewsletterForm()
    {
        if (! $this->newsletterForm) {
            $this->setNewsletterForm(
                $this->getServiceLocator()->get('playgrounduser_newsletter_form')
            );
        }

        return $this->newsletterForm;
    }
1366168
public function getNews()
    {
        if ($this->_oNewsList === null) {
            $this->_oNewsList = false;

            $iPerPage = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofCatArticles');
            $iPerPage = $iPerPage ? $iPerPage : 10;

            $oActNews = oxNew(\OxidEsales\Eshop\Application\Model\NewsList::class);

            if ($iCnt = $oActNews->getCount()) {
                $this->_iCntPages = ceil($iCnt / $iPerPage);
                $oActNews->loadNews($this->getActPage() * $iPerPage, $iPerPage);
                $this->_oNewsList = $oActNews;
            }
        }

        return $this->_oNewsList;
    }
1138207
public function renderToolModulesContentAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $zoneConfig = $this->params()->fromRoute('zoneconfig', array());

        $modulesInfo = $this->getModuleSvc()->getModulesAndVersions();
        $modules = $this->getModules();
        //exclude MelisDemoCms cause it is SiteModule
        // it will complicate some default layout/layout of the melis-core
        unset($modules['MelisDemoCms']);
        unset($modulesInfo['MelisDemoCms']);

        $view = new ViewModel();

        $view->melisKey    = $melisKey;
        $view->modules     = $modules;
        $view->modulesInfo = $modulesInfo;

        return $view;
    }
61534
public function renderToolProspectsHeaderRefreshAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');
        
        $view = new ViewModel();
        $view->melisKey = $melisKey;
        
        return $view;
    }
487307
public function render()
    {
        $params = $this->toArray();
        $params['collection'] = $this->getDisplay()->getCollection();
        $params['pagination'] = null;

        if ($params['collection'] instanceof \Illuminate\Contracts\Pagination\Paginator) {
            if (class_exists('Illuminate\Pagination\BootstrapThreePresenter')) {
                $params['pagination'] = (new \Illuminate\Pagination\BootstrapThreePresenter($params['collection']))->render();
            } else {
                $params['pagination'] = $params['collection']->render();
            }
        }

        return app('sleeping_owl.template')->view($this->getView(), $params)->render();
    }
1114598
public function getViewModel() {
		if ($this->useCache) {
			$viewModel = $this->recacheAgent->getViewModel('show', $this->entityNamespace, $this->entityId);
			if ($viewModel) {
				return $viewModel;
			}
		}
		
		$this->viewModel = new ViewModel();
		
		$dataToDisplay = $this->getEntityData($this->entityId);
		$this->viewModel->setVariable('dataToDisplay', $dataToDisplay);
		
		$this->setupTemplate();
		$this->setupTitle();
		
		if ($this->useCache) {
			$this->recacheAgent->storeViewModel($this->viewModel, 'show', $this->entityNamespace, $this->entityId);
		}
		
		return $this->viewModel;
	}