![]() |
TYPO3
7.6
|
Public Member Functions | |
initConfigOptions () | |
displayEditPanel ($content, array $conf, $currentRecord, array $dataArray) | |
displayEditIcons ($content, $params, array $conf=array(), $currentRecord= '', array $dataArray=array(), $addUrlParamStr= '') | |
isEditAction () | |
isEditFormShown () | |
editAction () | |
doHide ($table, $uid) | |
doUnhide ($table, $uid) | |
doUp ($table, $uid) | |
doDown ($table, $uid) | |
doMoveAfter ($table, $uid) | |
doDelete ($table, $uid) | |
doSave ($table, $uid) | |
doSaveAndClose ($table, $uid) | |
doClose ($table, $uid) | |
getJavascriptIncludes () | |
getHiddenFields (array $dataArray) | |
Public Attributes | |
$TSFE_EDIT | |
Protected Member Functions | |
move ($table, $uid, $direction= '', $afterUID=0) | |
allowedToEditLanguage ($table, array $currentRecord) | |
allowedToEdit ($table, array $dataArray, array $conf, $checkEditAccessInternals=true) | |
getAllowedEditActions ($table, array $conf, $pid, $allow= '') | |
initializeTceMain () | |
Protected Attributes | |
$tce | |
Controller class for frontend editing.
Definition at line 23 of file FrontendEditingController.php.
|
protected |
Checks whether the user is allowed to edit the requested table.
string | $table | The name of the table. |
array | $dataArray | The data array. |
array | $conf | The configuration array for the edit panel. |
bool | $checkEditAccessInternals | Boolean indicating whether recordEditAccessInternals should not be checked. Defaults |
Definition at line 468 of file FrontendEditingController.php.
References $GLOBALS, Permission\CONTENT_EDIT, FrontendEditingController\getAllowedEditActions(), GeneralUtility\strtolower(), and GeneralUtility\trimExplode().
Referenced by FrontendEditingController\displayEditIcons(), and FrontendEditingController\displayEditPanel().
|
protected |
Checks whether the user has access to edit the language for the requested record.
string | $table | The name of the table. |
array | $currentRecord | The record. |
Definition at line 439 of file FrontendEditingController.php.
References $GLOBALS, $lang, and elseif.
Referenced by FrontendEditingController\displayEditIcons(), and FrontendEditingController\displayEditPanel().
displayEditIcons | ( | $content, | |
$params, | |||
array | $conf = array() , |
||
$currentRecord = '' , |
|||
array | $dataArray = array() , |
||
$addUrlParamStr = '' |
|||
) |
Adds an edit icon to the content string. The edit icon links to FormEngine with proper parameters for editing the table/fields of the context. This implements TYPO3 context sensitive editing facilities. Only backend users will have access (if properly configured as well).
string | $content | The content to which the edit icons should be appended |
string | $params | The parameters defining which table and fields to edit. Syntax is [tablename]:[fieldname],[fieldname],[fieldname],... OR [fieldname],[fieldname],[fieldname],... (basically "[tablename]:" is optional, default table is the one of the "current record" used in the function). The fieldlist is sent as "&columnsOnly=" parameter to FormEngine |
array | $conf | TypoScript properties for configuring the edit icons. |
string | $currentRecord | The "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW |
array | $dataArray | Alternative data array to use. Default is $this->data |
string | $addUrlParamStr | Additional URL parameters for the link pointing to FormEngine |
Definition at line 116 of file FrontendEditingController.php.
References $GLOBALS, FrontendEditingController\allowedToEdit(), FrontendEditingController\allowedToEditLanguage(), elseif, GeneralUtility\getUserObj(), and GeneralUtility\trimExplode().
Referenced by FrontendEditingController\displayEditPanel().
displayEditPanel | ( | $content, | |
array | $conf, | ||
$currentRecord, | |||
array | $dataArray | ||
) |
Generates the "edit panels" which can be shown for a page or records on a page when the Admin Panel is enabled for a backend users surfing the frontend. With the "edit panel" the user will see buttons with links to editing, moving, hiding, deleting the element This function is used for the cObject EDITPANEL and the stdWrap property ".editPanel"
string | $content | A content string containing the content related to the edit panel. For cObject "EDITPANEL" this is empty but not so for the stdWrap property. The edit panel is appended to this string and returned. |
array | $conf | TypoScript configuration properties for the editPanel |
string | $currentRecord | The "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW |
array | $dataArray | Alternative data array to use. Default is $this->data |
Definition at line 65 of file FrontendEditingController.php.
References $GLOBALS, FrontendEditingController\allowedToEdit(), FrontendEditingController\allowedToEditLanguage(), FrontendEditingController\displayEditIcons(), FrontendEditingController\getAllowedEditActions(), FrontendEditingController\getHiddenFields(), and GeneralUtility\getUserObj().
doClose | ( | $table, | |
$uid | |||
) |
Stub for closing a record. No real functionality needed since content element rendering will take care of everything.
string | $table | The table name for the record to close. |
int | $uid | The UID for the record to close. |
Definition at line 427 of file FrontendEditingController.php.
doDelete | ( | $table, | |
$uid | |||
) |
Deletes a specific record.
string | $table | The table name for the record to delete. |
int | $uid | The UID for the record to delete. |
Definition at line 373 of file FrontendEditingController.php.
References FrontendEditingController\initializeTceMain().
doDown | ( | $table, | |
$uid | |||
) |
Moves a record down.
string | $table | The table name for the record to move. |
int | $uid | The UID for the record to move. |
Definition at line 282 of file FrontendEditingController.php.
References FrontendEditingController\move().
doHide | ( | $table, | |
$uid | |||
) |
Hides a specific record.
string | $table | The table name for the record to hide. |
int | $uid | The UID for the record to hide. |
Definition at line 232 of file FrontendEditingController.php.
References $GLOBALS, and FrontendEditingController\initializeTceMain().
doMoveAfter | ( | $table, | |
$uid | |||
) |
Moves a record after a given element. Used for drag.
string | $table | The table name for the record to move. |
int | $uid | The UID for the record to move. |
Definition at line 294 of file FrontendEditingController.php.
References $GLOBALS, and FrontendEditingController\move().
doSave | ( | $table, | |
$uid | |||
) |
Saves a record based on its data array.
string | $table | The table name for the record to save. |
int | $uid | The UID for the record to save. |
Definition at line 390 of file FrontendEditingController.php.
References $GLOBALS, and FrontendEditingController\initializeTceMain().
Referenced by FrontendEditingController\doSaveAndClose().
doSaveAndClose | ( | $table, | |
$uid | |||
) |
Saves a record based on its data array and closes it.
string | $table | The table name for the record to save. |
int | $uid | The UID for the record to save. |
Definition at line 414 of file FrontendEditingController.php.
References FrontendEditingController\doSave().
doUnhide | ( | $table, | |
$uid | |||
) |
Unhides (shows) a specific record.
string | $table | The table name for the record to unhide. |
int | $uid | The UID for the record to unhide. |
Definition at line 251 of file FrontendEditingController.php.
References $GLOBALS, and FrontendEditingController\initializeTceMain().
doUp | ( | $table, | |
$uid | |||
) |
Moves a record up.
string | $table | The table name for the record to move. |
int | $uid | The UID for the record to hide. |
Definition at line 270 of file FrontendEditingController.php.
References FrontendEditingController\move().
editAction | ( | ) |
Management of the on-page frontend editing forms and edit panels. Basically taking in the data and commands and passes them on to the proper classes as they should be.
UnexpectedValueException | if TSFE_EDIT[cmd] is not a valid command |
Definition at line 197 of file FrontendEditingController.php.
References $GLOBALS, and GeneralUtility\callUserFunction().
Referenced by FrontendEditingController\initConfigOptions().
|
protected |
Takes an array of generally allowed actions and filters that list based on page and content permissions.
string | $table | The name of the table. |
array | $conf | The configuration array. |
int | $pid | The PID where editing will occur. |
string | $allow | Comma-separated list of actions that are allowed in general. |
Definition at line 517 of file FrontendEditingController.php.
References $GLOBALS, Permission\PAGE_DELETE, Permission\PAGE_EDIT, Permission\PAGE_NEW, GeneralUtility\strtolower(), and GeneralUtility\trimExplode().
Referenced by FrontendEditingController\allowedToEdit(), and FrontendEditingController\displayEditPanel().
getHiddenFields | ( | array | $dataArray | ) |
Gets the hidden fields (array key=field name, value=field value) to be used in the edit panel for a particular content element. In the normal case, no hidden fields are needed but special controllers such as TemplaVoila need to track flexform pointers, etc.
array | $dataArray | The data array for a specific content element. |
Definition at line 569 of file FrontendEditingController.php.
Referenced by FrontendEditingController\displayEditPanel().
getJavascriptIncludes | ( | ) |
Adds any extra Javascript includes needed for Front-end editing
Definition at line 556 of file FrontendEditingController.php.
initConfigOptions | ( | ) |
Initializes configuration options.
Definition at line 43 of file FrontendEditingController.php.
References $GLOBALS, GeneralUtility\_GP(), FrontendEditingController\editAction(), and FrontendEditingController\isEditAction().
|
protected |
Initializes since it is used on modification actions.
Definition at line 580 of file FrontendEditingController.php.
References GeneralUtility\makeInstance().
Referenced by FrontendEditingController\doDelete(), FrontendEditingController\doHide(), FrontendEditingController\doSave(), FrontendEditingController\doUnhide(), and FrontendEditingController\move().
isEditAction | ( | ) |
Returns TRUE if an edit-action is sent from the Admin Panel
Definition at line 156 of file FrontendEditingController.php.
Referenced by FrontendEditingController\initConfigOptions().
isEditFormShown | ( | ) |
Returns TRUE if an edit form is shown on the page. Used from index_ts.php where a TRUE return-value will result in classes etc. being included.
Definition at line 179 of file FrontendEditingController.php.
|
protected |
Moves a record
string | $table | The table name for the record to move. |
int | $uid | The UID for the record to move. |
string | $direction | The direction to move, either 'up' or 'down'. |
int | $afterUID | The UID of record to move after. This is specified for dragging only. |
Definition at line 309 of file FrontendEditingController.php.
References $GLOBALS, elseif, FrontendEditingController\initializeTceMain(), and GeneralUtility\trimExplode().
Referenced by FrontendEditingController\doDown(), FrontendEditingController\doMoveAfter(), and FrontendEditingController\doUp().
|
protected |
Definition at line 36 of file FrontendEditingController.php.
$TSFE_EDIT |
Definition at line 31 of file FrontendEditingController.php.