本文整理汇总了PHP中TYPO3\CMS\Core\Authentication\BackendUserAuthentication::workspaceAllowLiveRecordsInPID方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendUserAuthentication::workspaceAllowLiveRecordsInPID方法的具体用法?PHP BackendUserAuthentication::workspaceAllowLiveRecordsInPID怎么用?PHP BackendUserAuthentication::workspaceAllowLiveRecordsInPID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Authentication\BackendUserAuthentication
的用法示例。
在下文中一共展示了BackendUserAuthentication::workspaceAllowLiveRecordsInPID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process_datamap
//.........这里部分代码省略.........
// The numerical pid is inserted in the data array
$fieldArray['pid'] = $pid_value;
} else {
// points to another record before ifself
// If this table is sorted we better find the top sorting number
if ($sortRow) {
// Because $pid_value is < 0, getSortNumber returns an array
$tempArray = $this->getSortNumber($table, 0, $pid_value);
$fieldArray['pid'] = $tempArray['pid'];
$fieldArray[$sortRow] = $tempArray['sortNumber'];
} else {
// Here we fetch the PID of the record that we point to...
$tempdata = $this->recordInfo($table, abs($pid_value), 'pid');
$fieldArray['pid'] = $tempdata['pid'];
}
}
}
}
$theRealPid = $fieldArray['pid'];
// Now, check if we may insert records on this pid.
if ($theRealPid >= 0) {
// Checks if records can be inserted on this $pid.
$recordAccess = $this->checkRecordInsertAccess($table, $theRealPid);
if ($recordAccess) {
$this->addDefaultPermittedLanguageIfNotSet($table, $incomingFieldArray);
$recordAccess = $this->BE_USER->recordEditAccessInternals($table, $incomingFieldArray, true);
if (!$recordAccess) {
if ($this->enableLogging) {
$this->newlog('recordEditAccessInternals() check failed. [' . $this->BE_USER->errorMsg . ']', 1);
}
} elseif (!$this->bypassWorkspaceRestrictions) {
// Workspace related processing:
// If LIVE records cannot be created in the current PID due to workspace restrictions, prepare creation of placeholder-record
if ($res = $this->BE_USER->workspaceAllowLiveRecordsInPID($theRealPid, $table)) {
if ($res < 0) {
$recordAccess = false;
if ($this->enableLogging) {
$this->newlog('Stage for versioning root point and users access level did not allow for editing', 1);
}
}
} else {
// So, if no live records were allowed, we have to create a new version of this record:
if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
$createNewVersion = true;
} else {
$recordAccess = false;
if ($this->enableLogging) {
$this->newlog('Record could not be created in this workspace in this branch', 1);
}
}
}
}
}
} else {
debug('Internal ERROR: pid should not be less than zero!');
}
// Yes new record, change $record_status to 'insert'
$status = 'new';
} else {
// Nope... $id is a number
$fieldArray = array();
$recordAccess = $this->checkRecordUpdateAccess($table, $id, $incomingFieldArray, $hookObjectsArr);
if (!$recordAccess) {
if ($this->enableLogging) {
$propArr = $this->getRecordProperties($table, $id);
$this->log($table, $id, 2, 0, 1, 'Attempt to modify record \'%s\' (%s) without permission. Or non-existing page.', 2, array($propArr['header'], $table . ':' . $id), $propArr['event_pid']);