コード例 #1
0
ファイル: index.php プロジェクト: girardiv/image_autoresize
 /**
  * Generates the module content (TYPO3 7+).
  *
  * @param array $row
  * @return void
  */
 protected function moduleContent(array $row)
 {
     $this->formResultCompiler = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormResultCompiler');
     $wizard = $this->formResultCompiler->JStop();
     $wizard .= $this->buildForm($row);
     $wizard .= $this->formResultCompiler->printNeededJSFunctions();
     $this->content .= $wizard;
 }
コード例 #2
0
 /**
  * Main module operation
  *
  * @return void
  */
 public function main()
 {
     $body = '';
     // Begin edit:
     if (is_array($this->editconf)) {
         /** @var FormResultCompiler formResultCompiler */
         $this->formResultCompiler = GeneralUtility::makeInstance(FormResultCompiler::class);
         if ($this->editRegularContentFromId) {
             $this->editRegularContentFromId();
         }
         // Creating the editing form, wrap it with buttons, document selector etc.
         $editForm = $this->makeEditForm();
         if ($editForm) {
             $this->firstEl = reset($this->elementsData);
             // Checking if the currently open document is stored in the list of "open documents" - if not, add it:
             if (($this->docDat[1] !== $this->storeUrlMd5 || !isset($this->docHandler[$this->storeUrlMd5])) && !$this->dontStoreDocumentRef) {
                 $this->docHandler[$this->storeUrlMd5] = array($this->storeTitle, $this->storeArray, $this->storeUrl, $this->firstEl);
                 $this->getBackendUser()->pushModuleData('FormEngine', array($this->docHandler, $this->storeUrlMd5));
                 BackendUtility::setUpdateSignal('OpendocsController::updateNumber', count($this->docHandler));
             }
             // Module configuration
             $this->modTSconfig = $this->viewId ? BackendUtility::getModTSconfig($this->viewId, 'mod.xMOD_alt_doc') : array();
             $body = $this->formResultCompiler->JStop();
             $body .= $this->compileForm($editForm);
             $body .= $this->formResultCompiler->printNeededJSFunctions();
             $body .= '</form>';
         }
     }
     // Access check...
     // The page will show only if there is a valid page and if this page may be viewed by the user
     $this->pageinfo = BackendUtility::readPageAccess($this->viewId, $this->perms_clause);
     if ($this->pageinfo) {
         $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
     }
     // Setting up the buttons and markers for docheader
     $this->getButtons();
     $this->languageSwitch($this->firstEl['table'], $this->firstEl['uid'], $this->firstEl['pid']);
     $this->moduleTemplate->setContent($body);
 }