Project

General

Profile

Feature #89573 » addPossibilityToHideBaseUrlFromSlugField.patch

Sebastian Müller, 2019-11-04 08:49

View differences:

Classes/Form/Element/InputSlugElement.php
$languageField = $GLOBALS['TCA'][$table]['ctrl']['languageField'];
$languageId = (int)((is_array($row[$languageField]) ? $row[$languageField][0] : $row[$languageField]) ?? 0);
}
$baseUrl = $this->getPrefix($this->data['site'], $languageId);
$itemValue = $parameterArray['itemFormElValue'];
$config = $parameterArray['fieldConf']['config'];
if (isset($config['hideBaseUrl']) && (int)$config['hideBaseUrl'] === 1) {
$baseUrl = '';
} else {
$baseUrl = $this->getPrefix($this->data['site'], $languageId);
}
$evalList = GeneralUtility::trimExplode(',', $config['eval'], true);
$size = MathUtility::forceIntegerInRange($config['size'] ?? $this->defaultInputWidth, $this->minimumInputWidth, $this->maxInputWidth);
$width = (int)$this->formMaxWidth($size);
(2-2/2)