TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
EditDocumentController Class Reference
Inheritance diagram for EditDocumentController:
AbstractModule

Public Member Functions

 __construct ()
 
 preInit ()
 
 doProcessData ()
 
 init ()
 
 printContent ()
 
 compileForm ($editForm)
 
 shortCutLink ()
 
 openInNewWindowLink ()
 
 languageSwitch ($table, $uid, $pid=null)
 
 localizationRedirect ($justLocalized)
 
 getLanguages ($id)
 
 fixWSversioningInEditConf ($mapArray=false)
 
 getRecordForEdit ($table, $theUid)
 
 editRegularContentFromId ()
 
 compileStoreDat ()
 
 getNewIconMode ($table, $key= 'saveDocNew')
 
 closeDocument ($code=0)
 
 setDocument ($currentDocFromHandlerMD5= '', $retUrl= '')
 
 mainAction (ServerRequestInterface $request, ResponseInterface $response)
 
- Public Member Functions inherited from AbstractModule
 __construct ()
 
 processRequest (ServerRequestInterface $request, ResponseInterface $response)
 

Public Attributes

 $editconf
 
 $columnsOnly
 
 $defVals
 
 $overrideVals
 
 $returnUrl
 
 $closeDoc
 
 $doSave
 
 $data
 
 $cmd
 
 $mirror
 
 $cacheCmd
 
 $redirect
 
 $returnNewPageId
 
 $vC
 
 $uc
 
 $popViewId
 
 $popViewId_addParams
 
 $viewUrl
 
 $editRegularContentFromId
 
 $recTitle
 
 $noView
 
 $perms_clause
 
 $returnEditConf
 
 $doc
 
 $template
 
 $content
 
 $retUrl
 
 $R_URL_parts
 
 $R_URL_getvars
 
 $R_URI
 
 $MCONF
 
 $pageinfo
 
 $storeTitle = ''
 
 $storeArray
 
 $storeUrl
 
 $storeUrlMd5
 
 $docDat
 
 $docHandler
 
 $elementsData
 
 $firstEl
 
 $errorC
 
 $newC
 
 $viewId
 
 $viewId_addParams
 
 $modTSconfig
 
 $dontStoreDocumentRef = 0
 

Protected Member Functions

 getSignalSlotDispatcher ()
 
 emitFunctionAfterSignal ($signalName)
 
 generatePreviewCode ()
 
 parseAdditionalGetParameters (array &$parameters, array $typoScript)
 
 getButtons ()
 
 getBackendUser ()
 
 getLanguageService ()
 
 getDatabaseConnection ()
 

Protected Attributes

 $workspace
 
 $formResultCompiler
 
 $signalSlotDispatcher
 
 $previewData = []
 
- Protected Attributes inherited from AbstractModule
 $moduleTemplate
 
 $request
 

Detailed Description

Script Class: Drawing the editing form for editing records in TYPO3. Notice: It does NOT use tce_db.php to submit data to, rather it handles submissions itself

Definition at line 46 of file EditDocumentController.php.

Constructor & Destructor Documentation

__construct ( )

Constructor

Definition at line 409 of file EditDocumentController.php.

References $GLOBALS, and EditDocumentController\getLanguageService().

Member Function Documentation

closeDocument (   $code = 0)

Handling the closing of a document

Parameters
int$codeClose code: 0/1 will redirect to $this->retUrl, 3 will clear the docHandler (thus closing all documents) and other values will call setDocument with ->retUrl
Returns
void

Definition at line 1892 of file EditDocumentController.php.

References EditDocumentController\$storeUrlMd5, EditDocumentController\getBackendUser(), HttpUtility\redirect(), EditDocumentController\setDocument(), and BackendUtility\setUpdateSignal().

Referenced by EditDocumentController\preInit().

compileForm (   $editForm)

Put together the various elements (buttons, selectors, form) into a table

Parameters
string$editFormHTML form.
Returns
string Composite HTML

Definition at line 1440 of file EditDocumentController.php.

compileStoreDat ( )

Populates the variables $this->storeArray, $this->storeUrl, $this->storeUrlMd5

Returns
void
See Also
makeDocSel()

Definition at line 1860 of file EditDocumentController.php.

References GeneralUtility\compileSelectedGetVarsFromArray(), and GeneralUtility\implodeArrayForUrl().

Referenced by EditDocumentController\preInit().

doProcessData ( )

Detects, if a save command has been triggered.

Returns
bool TRUE, then save the document (data submitted)

Definition at line 502 of file EditDocumentController.php.

Referenced by EditDocumentController\mainAction().

editRegularContentFromId ( )

Function, which populates the internal editconf array with editing commands for all tt_content elements from the normal column in normal language from the page pointed to by $this->editRegularContentFromId

Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed with TYPO3 CMS 8

Definition at line 1832 of file EditDocumentController.php.

References BackendUtility\deleteClause(), EditDocumentController\getDatabaseConnection(), GeneralUtility\logDeprecatedFunction(), and BackendUtility\versioningPlaceholderClause().

Referenced by EditDocumentController\init().

emitFunctionAfterSignal (   $signalName)
protected

Emits a signal after a function was executed

Parameters
string$signalName

Definition at line 434 of file EditDocumentController.php.

References EditDocumentController\getSignalSlotDispatcher().

Referenced by EditDocumentController\init(), and EditDocumentController\preInit().

fixWSversioningInEditConf (   $mapArray = false)

Fix $this->editconf if versioning applies to any of the records

Parameters
array | bool$mapArrayMapping between old and new ids if auto-versioning has been performed.
Returns
void

Definition at line 1737 of file EditDocumentController.php.

References EditDocumentController\$cmd, $GLOBALS, EditDocumentController\getRecordForEdit(), and GeneralUtility\trimExplode().

Referenced by EditDocumentController\preInit().

generatePreviewCode ( )
protected
getBackendUser ( )
protected
getButtons ( )
protected
getDatabaseConnection ( )
protected
getLanguages (   $id)

Returns sys_language records available for record translations on given page.

Parameters
int$idPage id: If zero, the query will select all sys_language records from root level which are NOT hidden. If set to another value, the query will select all sys_language records that has a pages_language_overlay record on that page (and is not hidden, unless you are admin user)
Returns
array Language records including faked record for default language

Definition at line 1668 of file EditDocumentController.php.

References BackendUtility\deleteClause(), EditDocumentController\getBackendUser(), EditDocumentController\getDatabaseConnection(), EditDocumentController\getLanguageService(), and BackendUtility\getModTSconfig().

Referenced by EditDocumentController\languageSwitch().

getLanguageService ( )
protected
getNewIconMode (   $table,
  $key = 'saveDocNew' 
)

Function used to look for configuration of buttons in the form: Fx. disabling buttons or showing them at various positions.

Parameters
string$tableThe table for which the configuration may be specific
string$keyThe option for look for. Default is checking if the saveDocNew button should be displayed.
Returns
string Return value fetched from USER TSconfig

Definition at line 1878 of file EditDocumentController.php.

References EditDocumentController\getBackendUser().

Referenced by EditDocumentController\getButtons().

getRecordForEdit (   $table,
  $theUid 
)

Get record for editing.

Parameters
string$tableTable name
int$theUidRecord UID
Returns
array Returns record to edit, FALSE if none

Definition at line 1784 of file EditDocumentController.php.

References $GLOBALS, EditDocumentController\getBackendUser(), BackendUtility\getRecord(), and BackendUtility\getWorkspaceVersionOfRecord().

Referenced by EditDocumentController\fixWSversioningInEditConf().

getSignalSlotDispatcher ( )
protected

Get the SignalSlot dispatcher

Returns

Definition at line 421 of file EditDocumentController.php.

References EditDocumentController\$signalSlotDispatcher, and GeneralUtility\makeInstance().

Referenced by EditDocumentController\emitFunctionAfterSignal().

init ( )
languageSwitch (   $table,
  $uid,
  $pid = null 
)

Make selector box for creating new translation for a record or switching to edit the record in an existing language. Displays only languages which are available for the current page.

Parameters
string$tableTable name
int$uidUid for which to create a new language
int$pidPid of the record

Definition at line 1533 of file EditDocumentController.php.

References $GLOBALS, $lang, BackendUtility\deleteClause(), EditDocumentController\getBackendUser(), EditDocumentController\getDatabaseConnection(), EditDocumentController\getLanguages(), EditDocumentController\getLanguageService(), BackendUtility\getLinkToDataHandlerAction(), BackendUtility\getLiveVersionOfRecord(), BackendUtility\getRecord(), and BackendUtility\versioningPlaceholderClause().

localizationRedirect (   $justLocalized)

Redirects to FormEngine with new parameters to edit a just created localized record

Parameters
string$justLocalizedString passed by GET &justLocalized=
Returns
void

Definition at line 1635 of file EditDocumentController.php.

References $GLOBALS, GeneralUtility\_GP(), BackendUtility\deleteClause(), EditDocumentController\getDatabaseConnection(), HttpUtility\redirect(), GeneralUtility\sanitizeLocalUrl(), and BackendUtility\versioningPlaceholderClause().

Referenced by EditDocumentController\preInit().

mainAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Injects the request object for the current request or subrequest

Parameters
ServerRequestInterface$requestthe current request
ResponseInterface$response
Returns
ResponseInterface the response with the content

Definition at line 1968 of file EditDocumentController.php.

References $response, EditDocumentController\doProcessData(), MessageInterface\getBody(), EditDocumentController\init(), BackendUtility\lockRecords(), and EditDocumentController\preInit().

openInNewWindowLink ( )
parseAdditionalGetParameters ( array &  $parameters,
array  $typoScript 
)
protected

Migrates a set of (possibly nested) GET parameters in TypoScript syntax to a plain array

This basically removes the trailing dots of sub-array keys in TypoScript. The result can be used to create a query string with GeneralUtility::implodeArrayForUrl().

Parameters
array$parametersShould be an empty array by default
array$typoScriptThe TypoScript configuration

Definition at line 942 of file EditDocumentController.php.

Referenced by EditDocumentController\generatePreviewCode().

preInit ( )
printContent ( )

Outputting the accumulated content to screen

Returns
void
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8

Definition at line 1018 of file EditDocumentController.php.

References EditDocumentController\$content, and GeneralUtility\logDeprecatedFunction().

setDocument (   $currentDocFromHandlerMD5 = '',
  $retUrl = '' 
)

Redirects to the document pointed to by $currentDocFromHandlerMD5 OR $retUrl (depending on some internal calculations). Most likely you will get a header-location redirect from this function.

Parameters
string$currentDocFromHandlerMD5Pointer to the document in the docHandler array
string$retUrlAlternative/Default retUrl
Returns
void

Definition at line 1939 of file EditDocumentController.php.

References EditDocumentController\$retUrl, GeneralUtility\getIndpEnv(), and HttpUtility\redirect().

Referenced by EditDocumentController\closeDocument(), and EditDocumentController\preInit().

shortCutLink ( )

Create shortcut icon

Definition at line 1473 of file EditDocumentController.php.

Referenced by EditDocumentController\getButtons().

Member Data Documentation

$cacheCmd

Definition at line 128 of file EditDocumentController.php.

$closeDoc

Definition at line 95 of file EditDocumentController.php.

$cmd
$columnsOnly

Definition at line 64 of file EditDocumentController.php.

$content

Definition at line 240 of file EditDocumentController.php.

Referenced by EditDocumentController\printContent().

$data

Definition at line 111 of file EditDocumentController.php.

$defVals

Definition at line 72 of file EditDocumentController.php.

$doc

Definition at line 226 of file EditDocumentController.php.

$docDat

Definition at line 320 of file EditDocumentController.php.

$docHandler

Definition at line 330 of file EditDocumentController.php.

$dontStoreDocumentRef = 0

Definition at line 392 of file EditDocumentController.php.

$doSave

Definition at line 104 of file EditDocumentController.php.

$editconf

Definition at line 55 of file EditDocumentController.php.

Referenced by EditDocumentController\preInit().

Definition at line 185 of file EditDocumentController.php.

$elementsData

Definition at line 337 of file EditDocumentController.php.

$errorC

Definition at line 351 of file EditDocumentController.php.

$firstEl

Definition at line 344 of file EditDocumentController.php.

$formResultCompiler
protected

Definition at line 385 of file EditDocumentController.php.

$MCONF

Definition at line 278 of file EditDocumentController.php.

$mirror

Definition at line 121 of file EditDocumentController.php.

$modTSconfig

Definition at line 380 of file EditDocumentController.php.

$newC

Definition at line 358 of file EditDocumentController.php.

$noView

Definition at line 199 of file EditDocumentController.php.

$overrideVals

Definition at line 80 of file EditDocumentController.php.

Referenced by EditDocumentController\preInit().

$pageinfo

Definition at line 283 of file EditDocumentController.php.

$perms_clause

Definition at line 204 of file EditDocumentController.php.

$popViewId

Definition at line 162 of file EditDocumentController.php.

$popViewId_addParams

Definition at line 169 of file EditDocumentController.php.

$previewData = []
protected

Definition at line 404 of file EditDocumentController.php.

$R_URI

Definition at line 273 of file EditDocumentController.php.

$R_URL_getvars

Definition at line 266 of file EditDocumentController.php.

$R_URL_parts

Definition at line 258 of file EditDocumentController.php.

$recTitle

Definition at line 192 of file EditDocumentController.php.

$redirect

Definition at line 135 of file EditDocumentController.php.

$retUrl
$returnEditConf

Definition at line 212 of file EditDocumentController.php.

$returnNewPageId

Definition at line 143 of file EditDocumentController.php.

$returnUrl

Definition at line 88 of file EditDocumentController.php.

$signalSlotDispatcher
protected
$storeArray

Definition at line 299 of file EditDocumentController.php.

$storeTitle = ''

Definition at line 291 of file EditDocumentController.php.

$storeUrl

Definition at line 306 of file EditDocumentController.php.

$storeUrlMd5

Definition at line 313 of file EditDocumentController.php.

Referenced by EditDocumentController\closeDocument().

$template

Definition at line 233 of file EditDocumentController.php.

$uc

Definition at line 155 of file EditDocumentController.php.

$vC

Definition at line 148 of file EditDocumentController.php.

$viewId

Definition at line 366 of file EditDocumentController.php.

$viewId_addParams

Definition at line 373 of file EditDocumentController.php.

$viewUrl

Definition at line 176 of file EditDocumentController.php.

$workspace
protected

Definition at line 219 of file EditDocumentController.php.