TYPO3
7.6
|
Public Member Functions | |
__construct () | |
main () | |
toggleHighlight ($uid) | |
performRollback ($diff) | |
displaySettings () | |
displayMultipleDiff ($diff) | |
renderDiff ($entry, $table, $rollbackUid=0) | |
createMultipleDiff () | |
createChangeLog () | |
getHistoryData ($table, $uid) | |
generateTitle ($table, $uid) | |
createRollbackLink ($key, $alt= '', $type=0) | |
linkPage ($str, $inparams=array(), $anchor= '', $title= '') | |
removeFilefields ($table, $dataArray) | |
resolveElement ($table, $uid) | |
resolveShUid () | |
Public Attributes | |
$maxSteps = 20 | |
$showDiff = 1 | |
$showSubElements = 1 | |
$showInsertDelete = 1 | |
$element | |
$lastSyslogId | |
$returnUrl | |
$changeLog = array() | |
$showMarked = false | |
Protected Member Functions | |
hasPageAccess ($table, $uid) | |
hasTableAccess ($table) | |
getRecord ($table, $uid) | |
getBackendUser () | |
getArgument ($name) | |
getLanguageService () | |
getDatabaseConnection () | |
Protected Attributes | |
$recordCache = array() | |
$pageAccessCache = array() | |
$iconFactory | |
Class for the record history display module show_rechis
Definition at line 29 of file RecordHistory.php.
__construct | ( | ) |
Constructor for the class
Definition at line 106 of file RecordHistory.php.
References RecordHistory\getArgument(), GeneralUtility\makeInstance(), and RecordHistory\resolveShUid().
createChangeLog | ( | ) |
Creates change log including sub-elements, filling $this->changeLog
Definition at line 713 of file RecordHistory.php.
References RecordHistory\$changeLog, $GLOBALS, RecordHistory\getDatabaseConnection(), RecordHistory\getHistoryData(), and RecordHistory\hasPageAccess().
Referenced by RecordHistory\main(), and RecordHistory\performRollback().
createMultipleDiff | ( | ) |
Creates a diff between the current version of the records and the selected version
Definition at line 651 of file RecordHistory.php.
Referenced by RecordHistory\main().
createRollbackLink | ( | $key, | |
$alt = '' , |
|||
$type = 0 |
|||
) |
Creates a link for the rollback
string | $key | Parameter which is set to rollbackFields |
string | $alt | Optional, alternative label and title tag of image |
int | $type | Optional, type of rollback: 0 - ALL; 1 - element; 2 - field |
Definition at line 861 of file RecordHistory.php.
References RecordHistory\linkPage().
Referenced by RecordHistory\displayMultipleDiff(), and RecordHistory\renderDiff().
displayMultipleDiff | ( | $diff | ) |
Displays a diff over multiple fields including rollback links
array | $diff | Difference array |
Definition at line 556 of file RecordHistory.php.
References RecordHistory\createRollbackLink(), elseif, RecordHistory\generateTitle(), RecordHistory\getLanguageService(), and RecordHistory\renderDiff().
Referenced by RecordHistory\main().
displaySettings | ( | ) |
Displays settings
Definition at line 313 of file RecordHistory.php.
References RecordHistory\getArgument(), RecordHistory\getBackendUser(), GeneralUtility\getIndpEnv(), RecordHistory\getLanguageService(), RecordHistory\getRecord(), RecordHistory\hasPageAccess(), RecordHistory\linkPage(), GeneralUtility\linkThisScript(), and GeneralUtility\quoteJSvalue().
Referenced by RecordHistory\main().
generateTitle | ( | $table, | |
$uid | |||
) |
Generates the title and puts the record title behind
string | $table | |
string | $uid |
Definition at line 843 of file RecordHistory.php.
References $GLOBALS, RecordHistory\getRecord(), and BackendUtility\getRecordTitle().
Referenced by RecordHistory\displayMultipleDiff().
|
protected |
Fetches GET/POST arguments and sanitizes the values for the expected disposal. Invalid values will be converted to an empty string.
string | $name | Name of the argument |
Definition at line 1017 of file RecordHistory.php.
References GeneralUtility\_GP(), and GeneralUtility\sanitizeLocalUrl().
Referenced by RecordHistory\__construct(), RecordHistory\displaySettings(), RecordHistory\main(), and RecordHistory\resolveShUid().
|
protected |
Gets the current backend user.
Definition at line 1004 of file RecordHistory.php.
References $GLOBALS.
Referenced by RecordHistory\displaySettings(), RecordHistory\hasPageAccess(), RecordHistory\hasTableAccess(), and RecordHistory\resolveElement().
|
protected |
Definition at line 1064 of file RecordHistory.php.
References $GLOBALS.
Referenced by RecordHistory\createChangeLog(), RecordHistory\getHistoryData(), RecordHistory\main(), RecordHistory\resolveShUid(), and RecordHistory\toggleHighlight().
getHistoryData | ( | $table, | |
$uid | |||
) |
Gets history and delete/insert data from sys_log and sys_history
string | $table | DB table name |
int | $uid | UID of record |
Definition at line 756 of file RecordHistory.php.
References RecordHistory\$changeLog, $GLOBALS, debug(), RecordHistory\getDatabaseConnection(), RecordHistory\hasPageAccess(), RecordHistory\hasTableAccess(), and RecordHistory\resolveElement().
Referenced by RecordHistory\createChangeLog().
|
protected |
Definition at line 1056 of file RecordHistory.php.
References $GLOBALS.
Referenced by RecordHistory\displayMultipleDiff(), RecordHistory\displaySettings(), and RecordHistory\renderDiff().
|
protected |
Gets a database record.
string | $table | |
int | $uid |
Definition at line 991 of file RecordHistory.php.
References BackendUtility\getRecord().
Referenced by RecordHistory\displaySettings(), RecordHistory\generateTitle(), and RecordHistory\hasPageAccess().
|
protected |
Determines whether user has access to a page.
string | $table | |
int | $uid |
Definition at line 953 of file RecordHistory.php.
References RecordHistory\getBackendUser(), RecordHistory\getRecord(), and BackendUtility\readPageAccess().
Referenced by RecordHistory\createChangeLog(), RecordHistory\displaySettings(), and RecordHistory\getHistoryData().
|
protected |
Determines whether user has access to a table.
string | $table |
Definition at line 979 of file RecordHistory.php.
References RecordHistory\getBackendUser().
Referenced by RecordHistory\getHistoryData().
linkPage | ( | $str, | |
$inparams = array() , |
|||
$anchor = '' , |
|||
$title = '' |
|||
) |
Creates a link to the same page.
string | $str | String to wrap in tags (must be htmlspecialchars()'ed prior to calling function) |
array | $inparams | Array of key/value pairs to override the default values with. |
string | $anchor | Possible anchor value. |
string | $title | Possible title. |
Definition at line 876 of file RecordHistory.php.
References RecordHistory\$element, RecordHistory\$lastSyslogId, and RecordHistory\$returnUrl.
Referenced by RecordHistory\createRollbackLink(), and RecordHistory\displaySettings().
main | ( | ) |
Main function for the listing of history. It detects incoming variables like element reference, history element uid etc. and renders the correct screen.
Definition at line 124 of file RecordHistory.php.
References RecordHistory\$element, RecordHistory\createChangeLog(), RecordHistory\createMultipleDiff(), RecordHistory\displayMultipleDiff(), RecordHistory\displaySettings(), RecordHistory\getArgument(), RecordHistory\getDatabaseConnection(), RecordHistory\performRollback(), HttpUtility\redirect(), and RecordHistory\toggleHighlight().
performRollback | ( | $diff | ) |
perform rollback
array | $diff | Diff array to rollback |
Definition at line 196 of file RecordHistory.php.
References RecordHistory\createChangeLog(), elseif, GeneralUtility\makeInstance(), and RecordHistory\removeFilefields().
Referenced by RecordHistory\main().
removeFilefields | ( | $table, | |
$dataArray | |||
) |
Will traverse the field names in $dataArray and look in $GLOBALS['TCA'] if the fields are of types which cannot be handled by the sys_history (that is currently group types with internal_type set to "file")
string | $table | Table name |
array | $dataArray | The data array |
Definition at line 898 of file RecordHistory.php.
References $GLOBALS.
Referenced by RecordHistory\performRollback().
renderDiff | ( | $entry, | |
$table, | |||
$rollbackUid = 0 |
|||
) |
Renders HTML table-rows with the comparison information of an sys_history entry record
array | $entry | sys_history entry record. |
string | $table | The table name |
int | $rollbackUid | If set to UID of record, display rollback links |
Definition at line 609 of file RecordHistory.php.
References $GLOBALS, RecordHistory\createRollbackLink(), BackendUtility\getItemLabel(), RecordHistory\getLanguageService(), and GeneralUtility\makeInstance().
Referenced by RecordHistory\displayMultipleDiff().
resolveElement | ( | $table, | |
$uid | |||
) |
Convert input element reference to workspace version if any.
string | $table | Table of input element |
int | $uid | UID of record |
Definition at line 917 of file RecordHistory.php.
References $GLOBALS, RecordHistory\getBackendUser(), and BackendUtility\getWorkspaceVersionOfRecord().
Referenced by RecordHistory\getHistoryData().
resolveShUid | ( | ) |
Resolve sh_uid (used from log)
Definition at line 932 of file RecordHistory.php.
References RecordHistory\getArgument(), and RecordHistory\getDatabaseConnection().
Referenced by RecordHistory\__construct().
toggleHighlight | ( | $uid | ) |
Toggles highlight state of record
int | $uid | Uid of sys_history entry |
Definition at line 180 of file RecordHistory.php.
References RecordHistory\getDatabaseConnection().
Referenced by RecordHistory\main().
$changeLog = array() |
Definition at line 81 of file RecordHistory.php.
Referenced by RecordHistory\createChangeLog(), and RecordHistory\getHistoryData().
$element |
Definition at line 64 of file RecordHistory.php.
Referenced by RecordHistory\linkPage(), and RecordHistory\main().
|
protected |
Definition at line 101 of file RecordHistory.php.
$lastSyslogId |
Definition at line 71 of file RecordHistory.php.
Referenced by RecordHistory\linkPage().
$maxSteps = 20 |
Definition at line 36 of file RecordHistory.php.
|
protected |
Definition at line 96 of file RecordHistory.php.
|
protected |
Definition at line 91 of file RecordHistory.php.
$returnUrl |
Definition at line 76 of file RecordHistory.php.
Referenced by RecordHistory\linkPage().
$showDiff = 1 |
Definition at line 43 of file RecordHistory.php.
$showInsertDelete = 1 |
Definition at line 57 of file RecordHistory.php.
$showMarked = false |
Definition at line 86 of file RecordHistory.php.
$showSubElements = 1 |
Definition at line 50 of file RecordHistory.php.