/**
  * Initializes the DrawItem
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->view = $this->objectManager->get(StandaloneView::class);
     $this->view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:vantomas/Resources/Private/Templates/DrawItem/SiteLastUpdatedPages.html'));
     $this->pageRepository = $this->objectManager->get(PageRepository::class);
 }
 /**
  * @param ViewInterface $view
  */
 protected function initializeView(ViewInterface $view)
 {
     // Set template
     if ($this->settings['templateFile']) {
         $templateFile = GeneralUtility::getFileAbsFileName($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_sschhtml5videoplayer.']['view.']['templateRootPath'] . 'Audio/' . $this->settings['templateFile']);
         if (file_exists($templateFile)) {
             $view->setTemplatePathAndFilename($templateFile);
         }
     }
 }
 /**
  * Set the TS defined custom paths in view
  * 
  * Template path can be configured in TS via
  * plugin.<plugin_key>.settings.controller.<Controller_Name_Without_Controller>.<action_name_without_action>.template = full_path_to_template_with.html
  * 
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  * @throws Exception
  */
 protected function setCustomPathsInView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     // We use template method here to enable adding further informations in extending controllers
     $templatePathAndFilename = $this->getTsTemplatePathAndFilename();
     // We have no template path set by TS --> fallback
     if (!$templatePathAndFilename) {
         $templatePathAndFilename = $this->templatePathAndFileName;
     }
     if (isset($templatePathAndFilename) && strlen($templatePathAndFilename) > 0) {
         // We enable FILE: and EXT: prefix for template path
         if (file_exists(GeneralUtility::getFileAbsFileName($templatePathAndFilename))) {
             $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templatePathAndFilename));
         } else {
             throw new Exception('Given template path and filename could not be found or resolved: ' . GeneralUtility::getFileAbsFileName($templatePathAndFilename), 1284655109);
         }
     }
 }
 /**
  * Set the TS defined custom paths in view
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  * @throws Exception
  */
 protected function setCustomPathsInView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     // TODO we do not get global settings from pt_extlist merged into list_identifier settings here. fix this.
     // Get template for current action from settings for list identifier
     $templatePathAndFilename = $this->settings['listConfig'][$this->listIdentifier]['controller'][$this->request->getControllerName()][$this->request->getControllerActionName()]['template'];
     // Get template for current action from global settings (e.g. flexform)
     if (!$templatePathAndFilename) {
         $templatePathAndFilename = $this->settings['controller'][$this->request->getControllerName()][$this->request->getControllerActionName()]['template'];
     }
     // If no template is given before, take default one
     if (!$templatePathAndFilename) {
         $templatePathAndFilename = $this->templatePathAndFileName;
     }
     if (isset($templatePathAndFilename) && strlen($templatePathAndFilename) > 0) {
         if (file_exists(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($templatePathAndFilename))) {
             /* @var $view Tx_PtExtlist_View_BaseView */
             $view->setTemplatePathAndFilename(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($templatePathAndFilename));
         } else {
             throw new Exception('Given template path and filename could not be found or resolved: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($templatePathAndFilename), 1284655110);
         }
     }
 }
예제 #5
0
 /**
  * Set the TS defined custom paths in view
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  * @throws Exception
  */
 protected function setCustomPathsInView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     $templatePathAndFilename = null;
     // We can overwrite a template via TS using plugin.yag.settings.controller.<ControllerName>.<actionName>.template
     if ($this->configurationBuilder) {
         $templatePathAndFilename = $this->configurationBuilder->buildThemeConfiguration()->getTemplate($this->request->getControllerName(), $this->request->getControllerActionName());
         $this->objectManager->get('Tx_Yag_Utility_HeaderInclusion')->includeThemeDefinedHeader($this->configurationBuilder->buildThemeConfiguration());
     }
     if (!$templatePathAndFilename) {
         $templatePathAndFilename = $this->settings['controller'][$this->request->getControllerName()][$this->request->getControllerActionName()]['template'];
     }
     if (isset($templatePathAndFilename) && strlen($templatePathAndFilename) > 0) {
         /**
          * Format Overlay
          */
         if ($this->request->getFormat() && strtolower($this->request->getFormat()) !== 'html') {
             $templatePathAndFilename = Tx_Yag_Domain_FileSystem_Div::concatenatePaths(array(dirname($templatePathAndFilename), basename($templatePathAndFilename, '.html') . '.' . $this->request->getFormat()));
         }
         if (file_exists(GeneralUtility::getFileAbsFileName($templatePathAndFilename))) {
             $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templatePathAndFilename));
         } else {
             throw new Exception('Given template path and filename could not be found or resolved: ' . $templatePathAndFilename . ' 1284655109');
         }
     }
 }
예제 #6
0
 /**
  * Initializes the DrawItem
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->view = $this->objectManager->get(StandaloneView::class);
     $this->view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:vantomas/Resources/Private/Templates/DrawItem/CodeSnippet.html'));
 }