本文整理汇总了PHP中TYPO3\CMS\Backend\Utility\BackendUtility::getSpecConfParts方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendUtility::getSpecConfParts方法的具体用法?PHP BackendUtility::getSpecConfParts怎么用?PHP BackendUtility::getSpecConfParts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Utility\BackendUtility
的用法示例。
在下文中一共展示了BackendUtility::getSpecConfParts方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Render tree widget
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$table = $this->globalOptions['table'];
$field = $this->globalOptions['fieldName'];
$row = $this->globalOptions['databaseRow'];
$parameterArray = $this->globalOptions['parameterArray'];
// Field configuration from TCA:
$config = $parameterArray['fieldConf']['config'];
$disabled = '';
if ($this->isGlobalReadonly() || $config['readOnly']) {
$disabled = ' disabled="disabled"';
}
$resultArray = $this->initializeResultArray();
// "Extra" configuration; Returns configuration for the field based on settings found in the "types" fieldlist.
$specConf = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
$selItems = FormEngineUtility::getSelectItems($table, $field, $row, $parameterArray);
$html = $this->renderField($table, $field, $row, $parameterArray, $config, $selItems);
// Wizards:
if (!$disabled) {
$altItem = '<input type="hidden" name="' . $parameterArray['itemFormElName'] . '" value="' . htmlspecialchars($parameterArray['itemFormElValue']) . '" />';
$html = $this->renderWizards(array($html, $altItem), $config['wizards'], $table, $row, $field, $parameterArray, $parameterArray['itemFormElName'], $specConf);
}
$resultArray['html'] = $html;
return $resultArray;
}
示例2: render
/**
* Render tree widget
*
* @return array As defined in initializeResultArray() of AbstractNode
* @see AbstractNode::initializeResultArray()
*/
public function render()
{
$resultArray = $this->initializeResultArray();
$parameterArray = $this->data['parameterArray'];
$formElementId = md5($parameterArray['itemFormElName']);
// Field configuration from TCA:
$config = $parameterArray['fieldConf']['config'];
$resultArray['extJSCODE'] .= LF . $this->generateJavascript($formElementId);
$html = [];
$html[] = '<div class="typo3-tceforms-tree">';
$html[] = ' <input class="treeRecord" type="hidden"';
$html[] = ' ' . $this->getValidationDataAsDataAttribute($parameterArray['fieldConf']['config']);
$html[] = ' data-formengine-input-name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"';
$html[] = ' data-relatedfieldname="' . htmlspecialchars($parameterArray['itemFormElName']) . '"';
$html[] = ' name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"';
$html[] = ' id="treeinput' . $formElementId . '"';
$html[] = ' value="' . htmlspecialchars(implode(',', $config['treeData']['selectedNodes'])) . '"';
$html[] = ' />';
$html[] = '</div>';
$html[] = '<div id="tree_' . $formElementId . '"></div>';
$resultArray['html'] = implode(LF, $html);
// Wizards:
if (empty($config['readOnly'])) {
$resultArray['html'] = $this->renderWizards([$resultArray['html']], $config['wizards'], $this->data['tableName'], $this->data['databaseRow'], $this->data['fieldName'], $parameterArray, $parameterArray['itemFormElName'], BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']));
}
return $resultArray;
}
示例3: render
/**
* Render check boxes
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$table = $this->globalOptions['table'];
$field = $this->globalOptions['fieldName'];
$row = $this->globalOptions['databaseRow'];
$parameterArray = $this->globalOptions['parameterArray'];
// Field configuration from TCA:
$config = $parameterArray['fieldConf']['config'];
$disabled = '';
if ($this->isGlobalReadonly() || $config['readOnly']) {
$disabled = ' disabled="disabled"';
}
$this->resultArray = $this->initializeResultArray();
// "Extra" configuration; Returns configuration for the field based on settings found in the "types" fieldlist.
$specConf = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
$selItems = FormEngineUtility::getSelectItems($table, $field, $row, $parameterArray);
// Creating the label for the "No Matching Value" entry.
$noMatchingLabel = isset($parameterArray['fieldTSConfig']['noMatchingValue_label']) ? $this->getLanguageService()->sL($parameterArray['fieldTSConfig']['noMatchingValue_label']) : '[ ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue') . ' ]';
$html = $this->getSingleField_typeSelect_checkbox($table, $field, $row, $parameterArray, $config, $selItems, $noMatchingLabel);
// Wizards:
if (!$disabled) {
$html = $this->renderWizards(array($html), $config['wizards'], $table, $row, $field, $parameterArray, $parameterArray['itemFormElName'], $specConf);
}
$this->resultArray['html'] = $html;
return $this->resultArray;
}
示例4: resolve
/**
* Returns RichTextElement as class name if RTE widget should be rendered.
*
* @return string|void New class name or void if this resolver does not change current class name.
*/
public function resolve()
{
$table = $this->data['tableName'];
$fieldName = $this->data['fieldName'];
$row = $this->data['databaseRow'];
$parameterArray = $this->data['parameterArray'];
$backendUser = $this->getBackendUserAuthentication();
if (!$parameterArray['fieldConf']['config']['readOnly'] && $backendUser->isRTE()) {
// @todo: Most of this stuff is prepared by data providers within $this->data already
$specialConfiguration = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
// If "richtext" is within defaultExtras
if (isset($specialConfiguration['richtext'])) {
// Operates by reference on $row! 'pid' is changed ...
BackendUtility::fixVersioningPid($table, $row);
list($recordPid, $tsConfigPid) = BackendUtility::getTSCpidCached($table, $row['uid'], $row['pid']);
// If the pid-value is not negative (that is, a pid could NOT be fetched)
if ($tsConfigPid >= 0) {
// Fetch page ts config and do some magic with it to find out if RTE is disabled on TS level.
$rteSetup = $backendUser->getTSConfig('RTE', BackendUtility::getPagesTSconfig($recordPid));
$rteTcaTypeValue = $this->data['recordTypeValue'];
$rteSetupConfiguration = BackendUtility::RTEsetup($rteSetup['properties'], $table, $fieldName, $rteTcaTypeValue);
if (!$rteSetupConfiguration['disabled']) {
// Finally, we're sure the editor should really be rendered ...
return RichtextElement::class;
}
}
}
}
return null;
}
示例5: render
/**
* This will render a selector box element, or possibly a special construction with two selector boxes.
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$parameterArray = $this->data['parameterArray'];
// Field configuration from TCA:
$config = $parameterArray['fieldConf']['config'];
$selectItems = $parameterArray['fieldConf']['config']['items'];
// Get values in an array (and make unique, which is fine because there can be no duplicates anyway):
$itemArray = array_flip($parameterArray['itemFormElValue']);
$optionElements = [];
$initiallySelectedIndices = [];
foreach ($selectItems as $i => $item) {
$value = $item[1];
$attributes = [];
// Selected or not by default
if (isset($itemArray[$value])) {
$attributes['selected'] = 'selected';
$initiallySelectedIndices[] = $i;
unset($itemArray[$value]);
}
// Non-selectable element
if ((string) $value === '--div--') {
$attributes['disabled'] = 'disabled';
$attributes['class'] = 'formcontrol-select-divider';
}
$optionElements[] = $this->renderOptionElement($value, $item[0], $attributes);
}
// Remaining values:
if (!empty($itemArray) && !$parameterArray['fieldTSConfig']['disableNoMatchingValueElement'] && !$config['disableNoMatchingValueElement']) {
// Creating the label for the "No Matching Value" entry.
$noMatchingLabel = isset($parameterArray['fieldTSConfig']['noMatchingValue_label']) ? $this->getLanguageService()->sL($parameterArray['fieldTSConfig']['noMatchingValue_label']) : '[ ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue') . ' ]';
foreach ($itemArray as $unmatchedValue => $temp) {
// Compile <option> tag:
array_unshift($optionElements, $this->renderOptionElement($unmatchedValue, @sprintf($noMatchingLabel, $unmatchedValue), ['selected' => 'selected']));
}
}
$selectElement = $this->renderSelectElement($optionElements, $parameterArray, $config);
$resetButtonElement = $this->renderResetButtonElement($parameterArray['itemFormElName'] . '[]', $initiallySelectedIndices);
$html = [];
// Add an empty hidden field which will send a blank value if all items are unselected.
if (empty($config['readOnly'])) {
$html[] = '<input type="hidden" name="' . htmlspecialchars($parameterArray['itemFormElName']) . '" value="">';
}
// Put it all together
$width = $this->formMaxWidth($this->defaultInputWidth);
$html = array_merge($html, ['<div class="form-control-wrap" ' . ($width ? ' style="max-width: ' . $width . 'px"' : '') . '>', '<div class="form-wizards-wrap form-wizards-aside">', '<div class="form-wizards-element">', $selectElement, '</div>', '<div class="form-wizards-items">', $resetButtonElement, '</div>', '</div>', '</div>', '<p>', '<em>' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.holdDownCTRL', true) . '</em>', '</p>']);
$html = implode(LF, $html);
// Wizards:
if (empty($config['readOnly'])) {
$html = $this->renderWizards([$html], $config['wizards'], $this->data['tableName'], $this->data['databaseRow'], $this->data['fieldName'], $parameterArray, $parameterArray['itemFormElName'], BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']));
}
$resultArray = $this->initializeResultArray();
$resultArray['html'] = $html;
return $resultArray;
}
示例6: render
/**
* This will render a <textarea> OR RTE area form field,
* possibly with various control/validation features
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$table = $this->globalOptions['table'];
$fieldName = $this->globalOptions['fieldName'];
$row = $this->globalOptions['databaseRow'];
$parameterArray = $this->globalOptions['parameterArray'];
$resultArray = $this->initializeResultArray();
$backendUser = $this->getBackendUserAuthentication();
$validationConfig = array();
// "Extra" configuration; Returns configuration for the field based on settings found in the "types" fieldlist. Traditionally, this is where RTE configuration has been found.
$specialConfiguration = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
// Setting up the altItem form field, which is a hidden field containing the value
$altItem = '<input type="hidden" name="' . htmlspecialchars($parameterArray['itemFormElName']) . '" value="' . htmlspecialchars($parameterArray['itemFormElValue']) . '" />';
BackendUtility::fixVersioningPid($table, $row);
list($recordPid, $tsConfigPid) = BackendUtility::getTSCpidCached($table, $row['uid'], $row['pid']);
// If the pid-value is not negative (that is, a pid could NOT be fetched)
$rteSetup = $backendUser->getTSConfig('RTE', BackendUtility::getPagesTSconfig($recordPid));
$rteTcaTypeValue = BackendUtility::getTCAtypeValue($table, $row);
$rteSetupConfiguration = BackendUtility::RTEsetup($rteSetup['properties'], $table, $fieldName, $rteTcaTypeValue);
// Get RTE object, draw form and set flag:
$rteObject = BackendUtility::RTEgetObj();
$dummyFormEngine = new FormEngine();
$rteResult = $rteObject->drawRTE($dummyFormEngine, $table, $fieldName, $row, $parameterArray, $specialConfiguration, $rteSetupConfiguration, $rteTcaTypeValue, '', $tsConfigPid, $this->globalOptions, $this->initializeResultArray(), $this->getValidationDataAsDataAttribute($validationConfig));
// This is a compat layer for "other" RTE's: If the result is not an array, it is the html string,
// otherwise it is a structure similar to our casual return array
// @todo: This interface needs a full re-definition, RTE should probably be its own type in the
// @todo: end, and other RTE implementations could then just override this.
if (is_array($rteResult)) {
$html = $rteResult['html'];
$rteResult['html'] = '';
$resultArray = $this->mergeChildReturnIntoExistingResult($resultArray, $rteResult);
} else {
$html = $rteResult;
}
// Wizard
$html = $this->renderWizards(array($html, $altItem), $parameterArray['fieldConf']['config']['wizards'], $table, $row, $fieldName, $parameterArray, $parameterArray['itemFormElName'], $specialConfiguration, TRUE);
$resultArray['html'] = $html;
return $resultArray;
}
示例7: render
/**
* This will render a single-line input form field, possibly with various control/validation features
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
/** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$languageService = $this->getLanguageService();
$table = $this->data['tableName'];
$fieldName = $this->data['fieldName'];
$row = $this->data['databaseRow'];
$parameterArray = $this->data['parameterArray'];
$resultArray = $this->initializeResultArray();
$isDateField = false;
$config = $parameterArray['fieldConf']['config'];
$specConf = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
$size = MathUtility::forceIntegerInRange($config['size'] ?: $this->defaultInputWidth, $this->minimumInputWidth, $this->maxInputWidth);
$evalList = GeneralUtility::trimExplode(',', $config['eval'], true);
$classes = array();
$attributes = array();
if (!isset($config['checkbox'])) {
$config['checkbox'] = '0';
$checkboxIsset = false;
} else {
$checkboxIsset = true;
}
// set all date times available
$dateFormats = array('date' => '%d-%m-%Y', 'year' => '%Y', 'time' => '%H:%M', 'timesec' => '%H:%M:%S');
if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat']) {
$dateFormats['date'] = '%m-%d-%Y';
}
$dateFormats['datetime'] = $dateFormats['time'] . ' ' . $dateFormats['date'];
$dateFormats['datetimesec'] = $dateFormats['timesec'] . ' ' . $dateFormats['date'];
// readonly
if ($config['readOnly']) {
$itemFormElValue = $parameterArray['itemFormElValue'];
if (in_array('date', $evalList)) {
$config['format'] = 'date';
} elseif (in_array('datetime', $evalList)) {
$config['format'] = 'datetime';
} elseif (in_array('time', $evalList)) {
$config['format'] = 'time';
}
if (in_array('password', $evalList)) {
$itemFormElValue = $itemFormElValue ? '*********' : '';
}
$options = $this->data;
$options['parameterArray'] = array('fieldConf' => array('config' => $config), 'itemFormElValue' => $itemFormElValue);
$options['renderType'] = 'none';
return $this->nodeFactory->create($options)->render();
}
if (in_array('datetime', $evalList, true) || in_array('date', $evalList)) {
$classes[] = 't3js-datetimepicker';
$isDateField = true;
if (in_array('datetime', $evalList)) {
$attributes['data-date-type'] = 'datetime';
$dateFormat = $dateFormats['datetime'];
} elseif (in_array('date', $evalList)) {
$attributes['data-date-type'] = 'date';
$dateFormat = $dateFormats['date'];
}
if ($parameterArray['itemFormElValue'] > 0) {
$parameterArray['itemFormElValue'] += date('Z', $parameterArray['itemFormElValue']);
}
if (isset($config['range']['lower'])) {
$attributes['data-date-minDate'] = (int) $config['range']['lower'];
}
if (isset($config['range']['upper'])) {
$attributes['data-date-maxDate'] = (int) $config['range']['upper'];
}
} elseif (in_array('time', $evalList)) {
$dateFormat = $dateFormats['time'];
$isDateField = true;
$classes[] = 't3js-datetimepicker';
$attributes['data-date-type'] = 'time';
} elseif (in_array('timesec', $evalList)) {
$dateFormat = $dateFormats['timesec'];
$isDateField = true;
$classes[] = 't3js-datetimepicker';
$attributes['data-date-type'] = 'timesec';
} else {
if ($checkboxIsset === false) {
$config['checkbox'] = '';
}
}
// @todo: The whole eval handling is a mess and needs refactoring
foreach ($evalList as $func) {
switch ($func) {
case 'required':
$attributes['data-formengine-validation-rules'] = $this->getValidationDataAsJsonString(array('required' => true));
break;
default:
// @todo: This is ugly: The code should find out on it's own whether a eval definition is a
// @todo: keyword like "date", or a class reference. The global registration could be dropped then
// Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval()
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func])) {
if (class_exists($func)) {
$evalObj = GeneralUtility::makeInstance($func);
//.........这里部分代码省略.........
示例8: render
/**
* This will render a single-line input form field, possibly with various control/validation features
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$languageService = $this->getLanguageService();
$table = $this->data['tableName'];
$fieldName = $this->data['fieldName'];
$row = $this->data['databaseRow'];
$parameterArray = $this->data['parameterArray'];
$resultArray = $this->initializeResultArray();
$resultArray['requireJsModules'] = array('TYPO3/CMS/Rsaauth/RsaEncryptionModule');
$config = $parameterArray['fieldConf']['config'];
$specConf = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
$size = MathUtility::forceIntegerInRange($config['size'] ?: $this->defaultInputWidth, $this->minimumInputWidth, $this->maxInputWidth);
$evalList = GeneralUtility::trimExplode(',', $config['eval'], true);
$classes = array();
$attributes = array('type' => 'text', 'value' => '');
if ($config['readOnly']) {
$itemFormElValue = $parameterArray['itemFormElValue'];
$options = $this->data;
$options['parameterArray'] = array('fieldConf' => array('config' => $config), 'itemFormElValue' => $itemFormElValue);
$options['renderType'] = 'none';
return $this->nodeFactory->create($options)->render();
}
// @todo: The whole eval handling is a mess and needs refactoring
foreach ($evalList as $func) {
switch ($func) {
case 'required':
$attributes['data-formengine-validation-rules'] = $this->getValidationDataAsJsonString(array('required' => true));
break;
case 'password':
$attributes['type'] = 'password';
$attributes['value'] = '********';
$attributes['autocomplete'] = 'off';
break;
default:
// @todo: This is ugly: The code should find out on it's own whether a eval definition is a
// @todo: keyword like "date", or a class reference. The global registration could be dropped then
// Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval()
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func])) {
if (class_exists($func)) {
$evalObj = GeneralUtility::makeInstance($func);
if (method_exists($evalObj, 'deevaluateFieldValue')) {
$_params = array('value' => $parameterArray['itemFormElValue']);
$parameterArray['itemFormElValue'] = $evalObj->deevaluateFieldValue($_params);
}
}
}
}
}
$evalList = array_filter($evalList, function ($value) {
return $value !== 'password';
});
$paramsList = array('field' => $parameterArray['itemFormElName'], 'evalList' => implode(',', $evalList), 'is_in' => trim($config['is_in']));
// set classes
$classes[] = 'form-control';
$classes[] = 't3js-clearable';
$classes[] = 'hasDefaultValue';
// calculate attributes
$attributes['data-formengine-validation-rules'] = $this->getValidationDataAsJsonString($config);
$attributes['data-formengine-input-params'] = json_encode($paramsList);
$attributes['data-formengine-input-name'] = htmlspecialchars($parameterArray['itemFormElName']);
$attributes['id'] = StringUtility::getUniqueId('formengine-input-');
if (isset($config['max']) && (int) $config['max'] > 0) {
$attributes['maxlength'] = (int) $config['max'];
}
if (!empty($classes)) {
$attributes['class'] = implode(' ', $classes);
}
if (isset($config['max']) && (int) $config['max'] > 0) {
$attributes['maxlength'] = (int) $config['max'];
}
// This is the EDITABLE form field.
if (!empty($config['placeholder'])) {
$attributes['placeholder'] = trim($config['placeholder']);
}
if (isset($config['autocomplete'])) {
$attributes['autocomplete'] = empty($config['autocomplete']) ? 'off' : 'on';
}
// Build the attribute string
$attributeString = '';
foreach ($attributes as $attributeName => $attributeValue) {
$attributeString .= ' ' . $attributeName . '="' . htmlspecialchars($attributeValue) . '"';
}
$html = '
<input' . $attributeString . $parameterArray['onFocus'] . ' />';
// This is the ACTUAL form field - values from the EDITABLE field must be transferred to this field which is the one that is written to the database.
$html .= '<input type="hidden" data-rsa-encryption="" id="' . $parameterArray['itemFormElID'] . '_hidden" name="' . $parameterArray['itemFormElName'] . '" value="' . htmlspecialchars($parameterArray['itemFormElValue']) . '" />';
// Going through all custom evaluations configured for this field
// @todo: Similar to above code!
foreach ($evalList as $evalData) {
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$evalData])) {
if (class_exists($evalData)) {
$evalObj = GeneralUtility::makeInstance($evalData);
if (method_exists($evalObj, 'returnFieldJS')) {
$resultArray['extJSCODE'] .= LF . 'TBE_EDITOR.customEvalFunctions[' . GeneralUtility::quoteJSvalue($evalData) . '] = function(value) {' . $evalObj->returnFieldJS() . '}';
}
//.........这里部分代码省略.........
示例9: render
/**
* This will render a <textarea>
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$languageService = $this->getLanguageService();
$table = $this->data['tableName'];
$fieldName = $this->data['fieldName'];
$row = $this->data['databaseRow'];
$parameterArray = $this->data['parameterArray'];
$resultArray = $this->initializeResultArray();
$backendUser = $this->getBackendUserAuthentication();
$config = $parameterArray['fieldConf']['config'];
// Setting columns number
$cols = MathUtility::forceIntegerInRange($config['cols'] ?: $this->defaultInputWidth, $this->minimumInputWidth, $this->maxInputWidth);
// Setting number of rows
$rows = MathUtility::forceIntegerInRange($config['rows'] ?: 5, 1, 20);
$originalRows = $rows;
$itemFormElementValueLength = strlen($parameterArray['itemFormElValue']);
if ($itemFormElementValueLength > $this->charactersPerRow * 2) {
$cols = $this->maxInputWidth;
$rows = MathUtility::forceIntegerInRange(round($itemFormElementValueLength / $this->charactersPerRow), count(explode(LF, $parameterArray['itemFormElValue'])), 20);
if ($rows < $originalRows) {
$rows = $originalRows;
}
}
// must be called after the cols and rows calculation, so the parameters are applied
// to read-only fields as well.
// @todo: Same as in InputTextElement ...
if ($config['readOnly']) {
$config['cols'] = $cols;
$config['rows'] = $rows;
$options = $this->data;
$options['parameterArray'] = array('fieldConf' => array('config' => $config), 'itemFormElValue' => $parameterArray['itemFormElValue']);
$options['renderType'] = 'none';
return $this->nodeFactory->create($options)->render();
}
$evalList = GeneralUtility::trimExplode(',', $config['eval'], true);
// "Extra" configuration; Returns configuration for the field based on settings found in the "types" fieldlist. Traditionally, this is where RTE configuration has been found.
$specialConfiguration = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
$html = '';
// Show message, if no RTE (field can only be edited with RTE!)
if ($specialConfiguration['rte_only']) {
$html = '<p><em>' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.noRTEfound')) . '</em></p>';
} else {
$attributes = array();
// validation
foreach ($evalList as $func) {
if ($func === 'required') {
$attributes['data-formengine-validation-rules'] = $this->getValidationDataAsJsonString(array('required' => true));
} else {
// @todo: This is ugly: The code should find out on it's own whether a eval definition is a
// @todo: keyword like "date", or a class reference. The global registration could be dropped then
// Pair hook to the one in \TYPO3\CMS\Core\DataHandling\DataHandler::checkValue_input_Eval()
// There is a similar hook for "evaluateFieldValue" in DataHandler and InputTextElement
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func])) {
if (class_exists($func)) {
$evalObj = GeneralUtility::makeInstance($func);
if (method_exists($evalObj, 'deevaluateFieldValue')) {
$_params = array('value' => $parameterArray['itemFormElValue']);
$parameterArray['itemFormElValue'] = $evalObj->deevaluateFieldValue($_params);
}
}
}
}
}
// calculate classes
$classes = array();
$classes[] = 'form-control';
$classes[] = 't3js-formengine-textarea';
$classes[] = 'formengine-textarea';
if ($specialConfiguration['fixed-font']) {
$classes[] = 'text-monospace';
}
if ($specialConfiguration['enable-tab']) {
$classes[] = 't3js-enable-tab';
}
// calculate styles
$styles = array();
// add the max-height from the users' preference to it
$maximumHeight = (int) $backendUser->uc['resizeTextareas_MaxHeight'];
if ($maximumHeight > 0) {
$styles[] = 'max-height: ' . $maximumHeight . 'px';
}
// calculate attributes
$attributes['id'] = StringUtility::getUniqueId('formengine-textarea-');
$attributes['name'] = htmlspecialchars($parameterArray['itemFormElName']);
$attributes['data-formengine-input-name'] = htmlspecialchars($parameterArray['itemFormElName']);
if (!empty($styles)) {
$attributes['style'] = implode(' ', $styles);
}
if (!empty($classes)) {
$attributes['class'] = implode(' ', $classes);
}
$attributes['rows'] = $rows;
$attributes['wrap'] = $specialConfiguration['nowrap'] ? 'off' : ($config['wrap'] ?: 'virtual');
$attributes['onChange'] = implode('', $parameterArray['fieldChangeFunc']);
if (isset($config['max']) && (int) $config['max'] > 0) {
//.........这里部分代码省略.........
示例10: render
/**
* This will render a <textarea> OR RTE area form field,
* possibly with various control/validation features
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$table = $this->data['tableName'];
$fieldName = $this->data['fieldName'];
$row = $this->data['databaseRow'];
$parameterArray = $this->data['parameterArray'];
$backendUser = $this->getBackendUserAuthentication();
$this->resultArray = $this->initializeResultArray();
$this->defaultExtras = BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']);
$this->pidOfPageRecord = $table === 'pages' && MathUtility::canBeInterpretedAsInteger($row['uid']) ? (int) $row['uid'] : (int) $row['pid'];
BackendUtility::fixVersioningPid($table, $row);
$this->pidOfVersionedMotherRecord = (int) $row['pid'];
$this->vanillaRteTsConfig = $backendUser->getTSConfig('RTE', BackendUtility::getPagesTSconfig($this->pidOfPageRecord));
$this->processedRteConfiguration = BackendUtility::RTEsetup($this->vanillaRteTsConfig['properties'], $table, $fieldName, $this->data['recordTypeValue']);
$this->client = $this->clientInfo();
$this->domIdentifier = preg_replace('/[^a-zA-Z0-9_:.-]/', '_', $parameterArray['itemFormElName']);
$this->domIdentifier = htmlspecialchars(preg_replace('/^[^a-zA-Z]/', 'x', $this->domIdentifier));
$this->initializeLanguageRelatedProperties();
// Get skin file name from Page TSConfig if any
$skinFilename = trim($this->processedRteConfiguration['skin']) ?: 'EXT:rtehtmlarea/Resources/Public/Css/Skin/htmlarea.css';
$skinFilename = $this->getFullFileName($skinFilename);
$skinDirectory = dirname($skinFilename);
// jQuery UI Resizable style sheet and main skin stylesheet
$this->resultArray['stylesheetFiles'][] = $skinDirectory . '/jquery-ui-resizable.css';
$this->resultArray['stylesheetFiles'][] = $skinFilename;
$this->enableRegisteredPlugins();
// Configure toolbar
$this->setToolbar();
// Check if some plugins need to be disabled
$this->setPlugins();
// Merge the list of enabled plugins with the lists from the previous RTE editing areas on the same form
$this->pluginEnabledCumulativeArray = $this->pluginEnabledArray;
$this->addInstanceJavaScriptRegistration();
$this->addOnSubmitJavaScriptCode();
// Add RTE JavaScript
$this->loadRequireModulesForRTE();
// Create language labels
$this->createJavaScriptLanguageLabelsFromFiles();
// Get RTE init JS code
$this->resultArray['additionalJavaScriptPost'][] = $this->getRteInitJsCode();
$html = $this->getMainHtml();
$this->resultArray['html'] = $this->renderWizards(array($html), $parameterArray['fieldConf']['config']['wizards'], $table, $row, $fieldName, $parameterArray, $parameterArray['itemFormElName'], $this->defaultExtras, true);
return $this->resultArray;
}
示例11: render
//.........这里部分代码省略.........
$height = (int) $config['size'] * 20;
} else {
$height = 280;
}
$autoSizeMax = null;
if (isset($config['autoSizeMax']) && (int) $config['autoSizeMax'] > 0) {
$autoSizeMax = (int) $config['autoSizeMax'] * 20;
}
$header = false;
$expanded = false;
$width = 280;
$appearance = $config['treeConfig']['appearance'];
if (is_array($appearance)) {
$header = (bool) $appearance['showHeader'];
$expanded = (bool) $appearance['expandAll'];
if (isset($appearance['width'])) {
$width = (int) $appearance['width'];
}
}
$onChange = '';
if ($parameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged']) {
$onChange = $parameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'];
}
// Create a JavaScript code line which will ask the user to save/update the form due to changing the element.
// This is used for eg. "type" fields and others configured with "requestUpdate"
if (!empty($GLOBALS['TCA'][$table]['ctrl']['type']) && $field === $GLOBALS['TCA'][$table]['ctrl']['type'] || !empty($GLOBALS['TCA'][$table]['ctrl']['requestUpdate']) && GeneralUtility::inList(str_replace(' ', '', $GLOBALS['TCA'][$table]['ctrl']['requestUpdate']), $field)) {
if ($this->getBackendUserAuthentication()->jsConfirmation(JsConfirmation::TYPE_CHANGE)) {
$onChange = 'top.TYPO3.Modal.confirm(TBE_EDITOR.labels.refreshRequired.title, TBE_EDITOR.labels.refreshRequired.content).on("button.clicked", function(e) { if (e.target.name == "ok" && TBE_EDITOR.checkSubmit(-1)) { TBE_EDITOR.submitForm() } top.TYPO3.Modal.dismiss(); });';
} else {
$onChange .= 'if (TBE_EDITOR.checkSubmit(-1)){ TBE_EDITOR.submitForm() };';
}
}
$html = '
<div class="typo3-tceforms-tree">
<input class="treeRecord" type="hidden" ' . $this->getValidationDataAsDataAttribute($config) . ' data-formengine-input-name="' . htmlspecialchars($parameterArray['itemFormElName']) . '"' . ' data-relatedfieldname="' . htmlspecialchars($parameterArray['itemFormElName']) . '"' . ' name="' . htmlspecialchars($parameterArray['itemFormElName']) . '" id="treeinput' . $id . '" value="' . htmlspecialchars(implode(',', $selectedNodesForApi)) . '" />
</div>
<div id="tree_' . $id . '">
</div>';
// Wizards:
if (empty($config['readOnly'])) {
$html = $this->renderWizards(array($html), $config['wizards'], $table, $row, $field, $parameterArray, $parameterArray['itemFormElName'], BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']));
}
$resultArray = $this->initializeResultArray();
$resultArray['extJSCODE'] .= LF . 'Ext.onReady(function() {
TYPO3.Components.Tree.StandardTreeItemData["' . $id . '"] = ' . json_encode($itemArray) . ';
var tree' . $id . ' = new TYPO3.Components.Tree.StandardTree({
id: "' . $id . '",
showHeader: ' . (int) $header . ',
onChange: ' . GeneralUtility::quoteJSvalue($onChange) . ',
countSelectedNodes: ' . count($selectedNodesForApi) . ',
width: ' . (int) $width . ',
listeners: {
click: function(node, event) {
if (typeof(node.attributes.checked) == "boolean") {
node.attributes.checked = ! node.attributes.checked;
node.getUI().toggleCheck(node.attributes.checked);
}
},
dblclick: function(node, event) {
if (typeof(node.attributes.checked) == "boolean") {
node.attributes.checked = ! node.attributes.checked;
node.getUI().toggleCheck(node.attributes.checked);
}
},
checkchange: TYPO3.Components.Tree.TcaCheckChangeHandler,
collapsenode: function(node) {
if (node.id !== "root") {
top.TYPO3.Storage.Persistent.removeFromList("tcaTrees." + this.ucId, node.attributes.uid);
}
},
expandnode: function(node) {
if (node.id !== "root") {
top.TYPO3.Storage.Persistent.addToList("tcaTrees." + this.ucId, node.attributes.uid);
}
},
beforerender: function(treeCmp) {
// Check if that tree element is already rendered. It is appended on the first tceforms_inline call.
if (Ext.fly(treeCmp.getId())) {
return false;
}
}' . ($expanded ? ',
afterrender: function(treeCmp) {
treeCmp.expandAll();
}' : '') . '
},
tcaMaxItems: ' . ($config['maxitems'] ? (int) $config['maxitems'] : 99999) . ',
tcaSelectRecursiveAllowed: ' . ($appearance['allowRecursiveMode'] ? 'true' : 'false') . ',
tcaSelectRecursive: false,
tcaExclusiveKeys: "' . ($config['exclusiveKeys'] ? $config['exclusiveKeys'] : '') . '",
ucId: "' . md5($table . '|' . $field) . '",
selModel: TYPO3.Components.Tree.EmptySelectionModel,
disabled: ' . ($config['readOnly'] ? 'true' : 'false') . '
});' . LF . ($autoSizeMax ? 'tree' . $id . '.bodyStyle = "max-height: ' . $autoSizeMax . 'px;min-height: ' . $height . 'px;";' : 'tree' . $id . '.height = ' . $height . ';') . LF . 'window.setTimeout(function() {
tree' . $id . '.render("tree_' . $id . '");
}, 200);
});';
$resultArray['html'] = $html;
return $resultArray;
}
示例12: render
//.........这里部分代码省略.........
}
// Setting this hidden field (as a flag that JavaScript can read out)
if (!$disabled) {
$html .= '<input type="hidden" data-formengine-input-name="' . htmlspecialchars($parameterArray['itemFormElName']) . '" value="' . ($config['multiple'] ? 1 : 0) . '" />';
}
// Set max and min items:
$maxitems = MathUtility::forceIntegerInRange($config['maxitems'], 0);
if (!$maxitems) {
$maxitems = 100000;
}
// Get "removeItems":
$removeItems = GeneralUtility::trimExplode(',', $parameterArray['fieldTSConfig']['removeItems'], true);
// Get the array with selected items:
$itemsArray = $parameterArray['itemFormElValue'] ?: [];
// Perform modification of the selected items array:
// @todo: this part should probably be moved to TcaSelectItems provider?!
foreach ($itemsArray as $itemNumber => $itemValue) {
$itemArray = array(0 => $itemValue, 1 => '');
$itemIcon = null;
$isRemoved = in_array($itemValue, $removeItems) || $config['type'] == 'select' && $config['authMode'] && !$this->getBackendUserAuthentication()->checkAuthMode($table, $field, $itemValue, $config['authMode']);
if ($isRemoved && !$parameterArray['fieldTSConfig']['disableNoMatchingValueElement'] && !$config['disableNoMatchingValueElement']) {
$itemArray[1] = rawurlencode(@sprintf($noMatchingLabel, $itemValue));
} else {
if (isset($parameterArray['fieldTSConfig']['altLabels.'][$itemValue])) {
$itemArray[1] = rawurlencode($this->getLanguageService()->sL($parameterArray['fieldTSConfig']['altLabels.'][$itemValue]));
}
if (isset($parameterArray['fieldTSConfig']['altIcons.'][$itemValue])) {
$itemArray[2] = $parameterArray['fieldTSConfig']['altIcons.'][$itemValue];
}
}
if ($itemArray[1] === '') {
foreach ($selItems as $selItem) {
if ($selItem[1] == $itemValue) {
$itemArray[1] = $selItem[0];
break;
}
}
}
$itemsArray[$itemNumber] = implode('|', $itemArray);
}
// size must be at least two, as there are always maxitems > 1 (see parent function)
if (isset($config['size'])) {
$size = (int) $config['size'];
} else {
$size = 2;
}
$size = $config['autoSizeMax'] ? MathUtility::forceIntegerInRange(count($itemsArray) + 1, MathUtility::forceIntegerInRange($size, 1), $config['autoSizeMax']) : $size;
$itemsToSelect = [];
$filterTextfield = [];
$filterSelectbox = '';
if (!$disabled) {
// Create option tags:
$opt = array();
foreach ($selItems as $p) {
$opt[] = '<option value="' . htmlspecialchars($p[1]) . '" title="' . $p[0] . '">' . $p[0] . '</option>';
}
// Put together the selector box:
$selector_itemListStyle = isset($config['itemListStyle']) ? ' style="' . htmlspecialchars($config['itemListStyle']) . '"' : '';
$sOnChange = implode('', $parameterArray['fieldChangeFunc']);
$multiSelectId = StringUtility::getUniqueId('tceforms-multiselect-');
$itemsToSelect[] = '<select data-relatedfieldname="' . htmlspecialchars($parameterArray['itemFormElName']) . '" ' . 'data-exclusivevalues="' . htmlspecialchars($config['exclusiveKeys']) . '" ' . 'id="' . $multiSelectId . '" ' . 'data-formengine-input-name="' . htmlspecialchars($parameterArray['itemFormElName']) . '" ' . 'class="form-control t3js-formengine-select-itemstoselect" ' . ($size ? ' size="' . $size . '" ' : '') . 'onchange="' . htmlspecialchars($sOnChange) . '" ' . $parameterArray['onFocus'] . $this->getValidationDataAsDataAttribute($config) . $selector_itemListStyle . '>';
$itemsToSelect[] = implode(LF, $opt);
$itemsToSelect[] = '</select>';
// enable filter functionality via a text field
if ($config['enableMultiSelectFilterTextfield']) {
$filterTextfield[] = '<span class="input-group input-group-sm">';
$filterTextfield[] = '<span class="input-group-addon">';
$filterTextfield[] = '<span class="fa fa-filter"></span>';
$filterTextfield[] = '</span>';
$filterTextfield[] = '<input class="t3js-formengine-multiselect-filter-textfield form-control" value="">';
$filterTextfield[] = '</span>';
}
// enable filter functionality via a select
if (isset($config['multiSelectFilterItems']) && is_array($config['multiSelectFilterItems']) && count($config['multiSelectFilterItems']) > 1) {
$filterDropDownOptions = array();
foreach ($config['multiSelectFilterItems'] as $optionElement) {
$optionValue = $this->getLanguageService()->sL(isset($optionElement[1]) && $optionElement[1] != '' ? $optionElement[1] : $optionElement[0]);
$filterDropDownOptions[] = '<option value="' . htmlspecialchars($this->getLanguageService()->sL($optionElement[0])) . '">' . htmlspecialchars($optionValue) . '</option>';
}
$filterSelectbox = '<select class="form-control input-sm t3js-formengine-multiselect-filter-dropdown">' . implode(LF, $filterDropDownOptions) . '</select>';
}
}
if (!empty(trim($filterSelectbox)) && !empty($filterTextfield)) {
$filterSelectbox = '<div class="form-multigroup-item form-multigroup-element">' . $filterSelectbox . '</div>';
$filterTextfield = '<div class="form-multigroup-item form-multigroup-element">' . implode(LF, $filterTextfield) . '</div>';
$selectBoxFilterContents = '<div class="t3js-formengine-multiselect-filter-container form-multigroup-wrap">' . $filterSelectbox . $filterTextfield . '</div>';
} else {
$selectBoxFilterContents = trim($filterSelectbox . ' ' . implode(LF, $filterTextfield));
}
// Pass to "dbFileIcons" function:
$params = array('size' => $size, 'autoSizeMax' => MathUtility::forceIntegerInRange($config['autoSizeMax'], 0), 'style' => isset($config['selectedListStyle']) ? ' style="' . htmlspecialchars($config['selectedListStyle']) . '"' : '', 'dontShowMoveIcons' => $maxitems <= 1, 'maxitems' => $maxitems, 'info' => '', 'headers' => array('selector' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.selected'), 'items' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.items'), 'selectorbox' => $selectBoxFilterContents), 'noBrowser' => 1, 'rightbox' => implode(LF, $itemsToSelect), 'readOnly' => $disabled);
$html .= $this->dbFileIcons($parameterArray['itemFormElName'], '', '', $itemsArray, '', $params, $parameterArray['onFocus']);
// Wizards:
if (!$disabled) {
$html = $this->renderWizards(array($html), $config['wizards'], $table, $this->data['databaseRow'], $field, $parameterArray, $parameterArray['itemFormElName'], BackendUtility::getSpecConfParts($parameterArray['fieldConf']['defaultExtras']));
}
$resultArray = $this->initializeResultArray();
$resultArray['html'] = $html;
return $resultArray;
}
示例13: checkValue_flex_procInData_travDS
/**
* Processing of the sheet/language data array
* When it finds a field with a value the processing is done by ->checkValue_SW() by default but if a call back function name is given that method in this class will be called for the processing instead.
*
* @param array $dataValues New values (those being processed): Multidimensional Data array for sheet/language, passed by reference!
* @param array $dataValues_current Current values: Multidimensional Data array. May be empty array() if not needed (for callBackFunctions)
* @param array $uploadedFiles Uploaded files array for sheet/language. May be empty array() if not needed (for callBackFunctions)
* @param array $DSelements Data structure which fits the data array
* @param array $pParams A set of parameters to pass through for the calling of the evaluation functions / call back function
* @param string $callBackFunc Call back function, default is checkValue_SW(). If $this->callBackObj is set to an object, the callback function in that object is called instead.
* @param string $structurePath
* @return void
* @see checkValue_flex_procInData()
*/
public function checkValue_flex_procInData_travDS(&$dataValues, $dataValues_current, $uploadedFiles, $DSelements, $pParams, $callBackFunc, $structurePath)
{
if (!is_array($DSelements)) {
return;
}
// For each DS element:
foreach ($DSelements as $key => $dsConf) {
// Array/Section:
if ($DSelements[$key]['type'] == 'array') {
if (!is_array($dataValues[$key]['el'])) {
continue;
}
if ($DSelements[$key]['section']) {
$newIndexCounter = 0;
foreach ($dataValues[$key]['el'] as $ik => $el) {
if (!is_array($el)) {
continue;
}
if (!is_array($dataValues_current[$key]['el'])) {
$dataValues_current[$key]['el'] = array();
}
$theKey = key($el);
if (!is_array($dataValues[$key]['el'][$ik][$theKey]['el'])) {
continue;
}
$this->checkValue_flex_procInData_travDS($dataValues[$key]['el'][$ik][$theKey]['el'], is_array($dataValues_current[$key]['el'][$ik]) ? $dataValues_current[$key]['el'][$ik][$theKey]['el'] : array(), $uploadedFiles[$key]['el'][$ik][$theKey]['el'], $DSelements[$key]['el'][$theKey]['el'], $pParams, $callBackFunc, $structurePath . $key . '/el/' . $ik . '/' . $theKey . '/el/');
// If element is added dynamically in the flexform of TCEforms, we map the ID-string to the next numerical index we can have in that particular section of elements:
// The fact that the order changes is not important since order is controlled by a separately submitted index.
if (substr($ik, 0, 3) == 'ID-') {
$newIndexCounter++;
// Set mapping index
$this->newIndexMap[$ik] = (is_array($dataValues_current[$key]['el']) && !empty($dataValues_current[$key]['el']) ? max(array_keys($dataValues_current[$key]['el'])) : 0) + $newIndexCounter;
// Transfer values
$dataValues[$key]['el'][$this->newIndexMap[$ik]] = $dataValues[$key]['el'][$ik];
// Unset original
unset($dataValues[$key]['el'][$ik]);
}
}
} else {
if (!isset($dataValues[$key]['el'])) {
$dataValues[$key]['el'] = array();
}
$this->checkValue_flex_procInData_travDS($dataValues[$key]['el'], $dataValues_current[$key]['el'], $uploadedFiles[$key]['el'], $DSelements[$key]['el'], $pParams, $callBackFunc, $structurePath . $key . '/el/');
}
} else {
if (!is_array($dsConf['TCEforms']['config']) || !is_array($dataValues[$key])) {
continue;
}
foreach ($dataValues[$key] as $vKey => $data) {
if ($callBackFunc) {
if (is_object($this->callBackObj)) {
$res = $this->callBackObj->{$callBackFunc}($pParams, $dsConf['TCEforms']['config'], $dataValues[$key][$vKey], $dataValues_current[$key][$vKey], $uploadedFiles[$key][$vKey], $structurePath . $key . '/' . $vKey . '/');
} else {
$res = $this->{$callBackFunc}($pParams, $dsConf['TCEforms']['config'], $dataValues[$key][$vKey], $dataValues_current[$key][$vKey], $uploadedFiles[$key][$vKey], $structurePath . $key . '/' . $vKey . '/');
}
} else {
// Default
list($CVtable, $CVid, $CVcurValue, $CVstatus, $CVrealPid, $CVrecFID, $CVtscPID) = $pParams;
$additionalData = array('flexFormId' => $CVrecFID, 'flexFormPath' => trim(rtrim($structurePath, '/') . '/' . $key . '/' . $vKey, '/'));
$res = $this->checkValue_SW(array(), $dataValues[$key][$vKey], $dsConf['TCEforms']['config'], $CVtable, $CVid, $dataValues_current[$key][$vKey], $CVstatus, $CVrealPid, $CVrecFID, '', $uploadedFiles[$key][$vKey], $CVtscPID, $additionalData);
// Look for RTE transformation of field:
if ($dataValues[$key]['_TRANSFORM_' . $vKey] == 'RTE' && !$this->dontProcessTransformations) {
// Unsetting trigger field - we absolutely don't want that into the data storage!
unset($dataValues[$key]['_TRANSFORM_' . $vKey]);
if (isset($res['value'])) {
// Calculating/Retrieving some values here:
list(, , $recFieldName) = explode(':', $CVrecFID);
$theTypeString = BackendUtility::getTCAtypeValue($CVtable, $this->checkValue_currentRecord);
$specConf = BackendUtility::getSpecConfParts($dsConf['TCEforms']['defaultExtras']);
// Find, thisConfig:
$RTEsetup = $this->BE_USER->getTSConfig('RTE', BackendUtility::getPagesTSconfig($CVtscPID));
$thisConfig = BackendUtility::RTEsetup($RTEsetup['properties'], $CVtable, $recFieldName, $theTypeString);
$res['value'] = $this->transformRichtextContentToDatabase($res['value'], $CVtable, $recFieldName, $specConf, $thisConfig, $CVrealPid);
}
}
}
// Adding the value:
if (isset($res['value'])) {
$dataValues[$key][$vKey] = $res['value'];
}
// Finally, check if new and old values are different (or no .vDEFbase value is found) and if so, we record the vDEF value for diff'ing.
// We do this after $dataValues has been updated since I expect that $dataValues_current holds evaluated values from database (so this must be the right value to compare with).
if (substr($vKey, -9) != '.vDEFbase') {
// @deprecated: flexFormXMLincludeDiffBase is only enabled by ext:compatibility6 since TYPO3 CMS 7, vDEFbase can be unset / ignored with TYPO3 CMS 8
if ($this->clear_flexFormData_vDEFbase) {
$dataValues[$key][$vKey . '.vDEFbase'] = '';
//.........这里部分代码省略.........
示例14: getSpecConfFromString
/**
* Returns the "special" configuration of an "extra" string (non-parsed)
*
* @param string $extraString The "Part 4" of the fields configuration in "types" "showitem" lists.
* @param string $defaultExtras The ['defaultExtras'] value from field configuration
* @return array An array with the special options in.
* @see getSpecConfForField(), BackendUtility::getSpecConfParts()
* @todo Define visibility
*/
public function getSpecConfFromString($extraString, $defaultExtras)
{
return BackendUtility::getSpecConfParts($extraString, $defaultExtras);
}
示例15: getSpecConfPartsSplitsDefaultExtras
/**
* @test
*/
public function getSpecConfPartsSplitsDefaultExtras()
{
$defaultExtras = 'nowrap:wizards[foo|bar]:anotherDefaultExtras:some[other|setting|with|parameters]';
$expected = array('nowrap' => 1, 'wizards' => array('parameters' => array(0 => 'foo', 1 => 'bar')), 'anotherDefaultExtras' => 1, 'some' => array('parameters' => array(0 => 'other', 1 => 'setting', 2 => 'with', 3 => 'parameters')));
$this->assertEquals($expected, BackendUtility::getSpecConfParts($defaultExtras));
}