コード例 #1
0
 /**
  * Initialize view action
  *
  * @param \TYPO3\Flow\Mvc\View\ViewInterface $view
  * @return void
  */
 protected function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view)
 {
     $loggedUser = $this->securityContext->getAccount();
     $currentUrl = $this->request->getHttpRequest()->getUri();
     $view->assign('currentpage', $currentUrl);
     $view->assign('state', $this->base64UrlEncode($currentUrl));
     if ($loggedUser != NULL) {
         $view->assign('loggedInUser', $this->securityContext->getAccount()->getAccountIdentifier());
         $view->assign('currentUser', $this->securityContext->getAccount()->getParty());
     }
     $facebook_appid = $this->facebookService->getAppId();
     $facebook_redirecturi = $this->facebookService->getRedirectUri();
     $vkLoginUrl = $this->vkService->getAuthorizationUri();
     $this->view->assignMultiple(array('vk_url' => $vkLoginUrl, 'google_url' => $this->googlePlusService->getAuthorizationUri(), 'facebook_appid' => $facebook_appid, 'facebook_redirecturi' => $facebook_redirecturi));
 }
コード例 #2
0
 /**
  * @param \TYPO3\Flow\Mvc\View\ViewInterface $view
  * @return void
  */
 public function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view)
 {
     if ($this->request->getFormat() === 'html') {
         $javascriptFilesToInclude = $this->settings['javaScripts'];
         foreach ($this->settings['panels'] as $panelConfigurations) {
             foreach ($panelConfigurations as $panelName => $panelConfiguration) {
                 if (isset($panelConfiguration['javascripts'])) {
                     $javascriptFilesToInclude[$panelName] = $panelConfiguration['javascripts'];
                 }
             }
         }
         $view->assign('stylesheets', $this->filterAndSortArray($this->settings['stylesheets']));
         $view->assign('javaScripts', $this->filterAndSortArray($javascriptFilesToInclude));
         $view->assign('panels', $this->settings['panels']);
     }
 }
コード例 #3
0
 /**
  * Initialize view with default typoscript path for the plugin view
  *
  * @param \TYPO3\Flow\Mvc\View\ViewInterface $view The view to be initialized
  * @return void
  * @api
  */
 protected function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view)
 {
     $request = $this->request;
     $packageKey = str_replace('.', '', $request->getControllerPackageKey());
     $controllerName = $request->getControllerName();
     $actionName = $request->getControllerActionName();
     $view->setTypoScriptPath(sprintf('plugins/%s/%s/%s', $packageKey, $controllerName, $actionName));
     $node = $request->getInternalArgument('__node');
     $view->assign('value', $node);
 }
コード例 #4
0
 /**
  * Handles a request. The result output is returned by altering the given response.
  *
  * @param \TYPO3\Flow\Mvc\RequestInterface $request The request object
  * @param \TYPO3\Flow\Mvc\ResponseInterface $response The response, modified by this handler
  * @return void
  * @throws \TYPO3\Flow\Mvc\Exception\UnsupportedRequestTypeException
  * @api
  */
 public function processRequest(\TYPO3\Flow\Mvc\RequestInterface $request, \TYPO3\Flow\Mvc\ResponseInterface $response)
 {
     $this->initializeController($request, $response);
     $this->actionMethodName = $this->resolveActionMethodName();
     $this->initializeActionMethodArguments();
     $this->initializeActionMethodValidators();
     $this->mvcPropertyMappingConfigurationService->initializePropertyMappingConfigurationFromRequest($this->request, $this->arguments);
     $this->initializeAction();
     $actionInitializationMethodName = 'initialize' . ucfirst($this->actionMethodName);
     if (method_exists($this, $actionInitializationMethodName)) {
         call_user_func(array($this, $actionInitializationMethodName));
     }
     $this->mapRequestArgumentsToControllerArguments();
     if ($this->view === NULL) {
         $this->view = $this->resolveView();
     }
     if ($this->view !== NULL) {
         $this->view->assign('settings', $this->settings);
         $this->view->setControllerContext($this->controllerContext);
         $this->initializeView($this->view);
     }
     $this->callActionMethod();
 }
コード例 #5
0
ファイル: BaseController.php プロジェクト: yashodhank/panel
 /**
  * Initializes the view and assigns stuff like the locale and the language-navigation
  * options to the view, so they are available in every action's view.
  *
  * @param \TYPO3\Flow\Mvc\View\ViewInterface $view
  * @return void
  */
 protected function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view)
 {
     $view->assign('account', $this->account);
 }
 /**
  * @param ViewInterface $view
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     $view->assign('moduleConfiguration', $this->moduleConfiguration);
 }
コード例 #7
0
 /**
  * @param ViewInterface $view
  * @return void
  */
 public function initializeView(ViewInterface $view)
 {
     $view->assign('asyncThumbnails', $this->asyncThumbnails);
 }
コード例 #8
0
 /**
  * @param \TYPO3\Flow\Mvc\View\ViewInterface $view
  * @return void
  */
 public function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view)
 {
     $view->assign('asyncThumbnails', $this->asyncThumbnails);
 }
コード例 #9
0
 protected function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view)
 {
     $view->assign('model', $this->getModelType());
 }