|
@@ 7051-7064 (lines=14) @@
|
| 7048 |
|
* @param array $dataArr Alternative data array to use. Default is $this->data |
| 7049 |
|
* @return string The input content string with the editPanel appended. This function returns only an edit panel appended to the content string if a backend user is logged in (and has the correct permissions). Otherwise the content string is directly returned. |
| 7050 |
|
*/ |
| 7051 |
|
public function editPanel($content, $conf, $currentRecord = '', $dataArr = []) |
| 7052 |
|
{ |
| 7053 |
|
if ($this->getTypoScriptFrontendController()->beUserLogin && $this->getFrontendBackendUser()->frontendEdit instanceof FrontendEditingController) { |
| 7054 |
|
if (!$currentRecord) { |
| 7055 |
|
$currentRecord = $this->currentRecord; |
| 7056 |
|
} |
| 7057 |
|
if (empty($dataArr)) { |
| 7058 |
|
$dataArr = $this->data; |
| 7059 |
|
} |
| 7060 |
|
// Delegate rendering of the edit panel to the frontend edit |
| 7061 |
|
$content = $this->getFrontendBackendUser()->frontendEdit->displayEditPanel($content, $conf, $currentRecord, $dataArr); |
| 7062 |
|
} |
| 7063 |
|
return $content; |
| 7064 |
|
} |
| 7065 |
|
|
| 7066 |
|
/** |
| 7067 |
|
* 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. |
|
@@ 7078-7091 (lines=14) @@
|
| 7075 |
|
* @param string $addUrlParamStr Additional URL parameters for the link pointing to FormEngine |
| 7076 |
|
* @return string The input content string, possibly with edit icons added (not necessarily in the end but just after the last string of normal content. |
| 7077 |
|
*/ |
| 7078 |
|
public function editIcons($content, $params, array $conf = [], $currentRecord = '', $dataArr = [], $addUrlParamStr = '') |
| 7079 |
|
{ |
| 7080 |
|
if ($this->getTypoScriptFrontendController()->beUserLogin && $this->getFrontendBackendUser()->frontendEdit instanceof FrontendEditingController) { |
| 7081 |
|
if (!$currentRecord) { |
| 7082 |
|
$currentRecord = $this->currentRecord; |
| 7083 |
|
} |
| 7084 |
|
if (empty($dataArr)) { |
| 7085 |
|
$dataArr = $this->data; |
| 7086 |
|
} |
| 7087 |
|
// Delegate rendering of the edit panel to frontend edit class. |
| 7088 |
|
$content = $this->getFrontendBackendUser()->frontendEdit->displayEditIcons($content, $params, $conf, $currentRecord, $dataArr, $addUrlParamStr); |
| 7089 |
|
} |
| 7090 |
|
return $content; |
| 7091 |
|
} |
| 7092 |
|
|
| 7093 |
|
/** |
| 7094 |
|
* Returns TRUE if the input table/row would be hidden in the frontend (according nto the current time and simulate user group) |