getTSConfig()['admPanel.'] ?? []; $active = (int)$GLOBALS['TSFE']->displayEditIcons === 1 || (int)$GLOBALS['TSFE']->displayFieldEditIcons === 1; // Include classes for editing IF editing module in Admin Panel is open if ($active && isset($config['enable.'])) { foreach ($config['enable.'] as $value) { if ($value) { $parameters = $request->getParsedBody()['TSFE_EDIT'] ?? $request->getQueryParams()['TSFE_EDIT'] ?? null; if ($this->isValidEditAction($parameters)) { GeneralUtility::makeInstance(FrontendEditDataHandler::class, $parameters)->editAction(); } break; } } } } return $handler->handle($request); } /** * Returns TRUE if an edit-action is sent from the Admin Panel * * @param array|null $parameters * @return bool */ protected function isValidEditAction(array &$parameters = null): bool { if (!is_array($parameters)) { return false; } if ($parameters['cancel']) { unset($parameters['cmd']); } else { $cmd = (string)$parameters['cmd']; if (($cmd !== 'edit' || is_array($parameters['data']) && ($parameters['doSave'] || $parameters['update'] || $parameters['update_close'])) && $cmd !== 'new') { // $cmd can be a command like "hide" or "move". If $cmd is "edit" or "new" it's an indication to show the formfields. But if data is sent with update-flag then $cmd = edit is accepted because edit may be sent because of .keepGoing flag. return true; } } return false; } }