本文整理汇总了PHP中TYPO3\CMS\Backend\Utility\BackendUtility::splitTable_Uid方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendUtility::splitTable_Uid方法的具体用法?PHP BackendUtility::splitTable_Uid怎么用?PHP BackendUtility::splitTable_Uid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Utility\BackendUtility
的用法示例。
在下文中一共展示了BackendUtility::splitTable_Uid方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderForeignRecordHeaderControl_postProcess
/**
* Post-processing to define which control items to show. Possibly own icons can be added here.
*
* @param string $parentUid The uid of the parent (embedding) record (uid or NEW...)
* @param string $foreignTable The table (foreign_table) we create control-icons for
* @param array $childRecord The current record of that foreign_table
* @param array $childConfig TCA configuration of the current field of the child record
* @param boolean $isVirtual Defines whether the current records is only virtually shown and not physically part of the parent record
* @param array $controlItems (reference) Associative array with the currently available control items
*
* @return void
*/
public function renderForeignRecordHeaderControl_postProcess($parentUid, $foreignTable, array $childRecord, array $childConfig, $isVirtual, array &$controlItems)
{
if ($foreignTable != 'sys_file_reference') {
return;
}
if (!GeneralUtility::isFirstPartOfStr($childRecord['uid_local'], 'sys_file_')) {
return;
}
$parts = BackendUtility::splitTable_Uid($childRecord['uid_local']);
if (!isset($parts[1])) {
return;
}
$table = $childRecord['tablenames'];
$uid = $parentUid;
$arguments = GeneralUtility::_GET();
if ($this->isValidRecord($table, $uid) && isset($arguments['edit'])) {
$returnUrl = ['edit' => $arguments['edit'], 'returnUrl' => $arguments['returnUrl']];
if (GeneralUtility::compat_version('7.0')) {
$returnUrlGenerated = BackendUtility::getModuleUrl('record_edit', $returnUrl);
} else {
$returnUrlGenerated = 'alt_doc.php?' . ltrim(GeneralUtility::implodeArrayForUrl('', $returnUrl, '', true, true), '&') . BackendUtility::getUrlToken('editRecord');
}
$wizardArguments = ['P' => ['referenceUid' => $childRecord['uid'], 'returnUrl' => $returnUrlGenerated]];
$wizardUri = BackendUtility::getModuleUrl('focuspoint', $wizardArguments);
} else {
$wizardUri = 'javascript:alert(\'Please save the base record first, because open this wizard will not save the changes in the current form!\');';
}
/** @var WizardService $wizardService */
$wizardService = GeneralUtility::makeInstance('HDNET\\Focuspoint\\Service\\WizardService');
$this->arrayUnshiftAssoc($controlItems, 'focuspoint', $wizardService->getWizardButton($wizardUri));
}
示例2: renderForeignRecordHeaderControl_postProcess
/**
* Post-processing to define which control items to show. Possibly own icons can be added here.
*
* @param string $parentUid The uid of the parent (embedding) record (uid or NEW...)
* @param string $foreignTable The table (foreign_table) we create control-icons for
* @param array $childRecord The current record of that foreign_table
* @param array $childConfig TCA configuration of the current field of the child record
* @param boolean $isVirtual Defines whether the current records is only virtually shown and not physically part of the parent record
* @param array $controlItems (reference) Associative array with the currently available control items
*
* @return void
*/
public function renderForeignRecordHeaderControl_postProcess($parentUid, $foreignTable, array $childRecord, array $childConfig, $isVirtual, array &$controlItems)
{
if ($foreignTable != 'sys_file_reference') {
return;
}
if (!GeneralUtility::isFirstPartOfStr($childRecord['uid_local'], 'sys_file_')) {
return;
}
$parts = BackendUtility::splitTable_Uid($childRecord['uid_local']);
if (!isset($parts[1])) {
return;
}
$wizardArguments = array('P' => array('uid' => $this->getMetaDataUidByFileUid($parts[1]), 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')));
$wizardUri = BackendUtility::getModuleUrl('focuspoint', $wizardArguments);
$configuration = '<a href="' . $wizardUri . '" class="btn btn-default">' . IconUtility::getSpriteIcon('extensions-focuspoint-focuspoint') . '</a>';
$this->arrayUnshiftAssoc($controlItems, 'focuspoint', $configuration);
}
示例3: getInlineLabel
/**
* Get the user function label for the file_reference table
*
* @param array $params
* @return void
*/
public function getInlineLabel(array &$params)
{
$sysFileFields = isset($params['options']['sys_file']) && is_array($params['options']['sys_file']) ? $params['options']['sys_file'] : array();
if (!count($sysFileFields)) {
// Nothing to do
$params['title'] = $params['row']['uid'];
return;
}
$fileInfo = BackendUtility::splitTable_Uid($params['row']['uid_local'], 2);
$fileRecord = BackendUtility::getRecord($fileInfo[0], $fileInfo[1]);
// Configuration
$title = array();
foreach ($sysFileFields as $field) {
$value = '';
if ($field === 'title') {
if (isset($params['row']['title'])) {
$fullTitle = $params['row']['title'];
} else {
try {
$metaDataRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Index\\MetaDataRepository');
$metaData = $metaDataRepository->findByFileUid($fileRecord['uid']);
$fullTitle = $metaData['title'];
} catch (\TYPO3\CMS\Core\Resource\Exception\InvalidUidException $e) {
/**
* We just catch the exception here
* Reasoning: There is nothing an editor or even admin could do
*/
}
}
$value = BackendUtility::getRecordTitlePrep(htmlspecialchars($fullTitle));
} else {
if (isset($params['row'][$field])) {
$value = htmlspecialchars($params['row'][$field]);
} elseif (isset($fileRecord[$field])) {
$value = BackendUtility::getRecordTitlePrep($fileRecord[$field]);
}
}
if (!strlen($value)) {
continue;
}
$labelText = LocalizationUtility::translate('LLL:EXT:lang/locallang_tca.xlf:sys_file.' . $field, 'lang');
$title[] = '<dt>' . htmlspecialchars($labelText) . '</dt>' . '<dd>' . $value . '</dd>';
}
$params['title'] = '<dl>' . implode('', $title) . '</dl>';
}
示例4: render
/**
* Fetches tt_content records and returns them in an array
*
* @param string $recordList List of uids to fetch
* @return array Array of tt_content records
*/
public function render($recordList)
{
$records = array();
$recordList = GeneralUtility::TrimExplode(',', $recordList);
if (is_array($recordList) && count($recordList) > 0) {
foreach ($recordList as $recordIdentifier) {
$split = BackendUtility::splitTable_Uid($recordIdentifier);
$tableName = empty($split[0]) ? 'tt_content' : $split[0];
$shortcutRecord = BackendUtility::getRecord($tableName, $split[1]);
if (is_array($shortcutRecord)) {
if ($this->arguments['flexform2array']) {
// parse flexform
$flexformService = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\FlexFormService');
$shortcutRecord['pi_flexform'] = $flexformService->convertFlexFormContentToArray($shortcutRecord['pi_flexform']);
}
$records[] = $shortcutRecord;
}
}
}
return $records;
}
示例5: getRelatedGroupFieldUids
/**
* Return uids of related records for group type fields. Uids consisting of
* multiple parts like [table]_[uid]|[title] will be reduced to integers and
* validated against the allowed table. Uids without a table prefix are
* accepted in any case.
*
* @param array $fieldConfig TCA "config" section for the group type field.
* @param string $value A comma separated list of records
* @return array
*/
protected function getRelatedGroupFieldUids(array $fieldConfig, $value)
{
$relatedUids = [];
$allowedTable = $this->getAllowedTableForGroupField($fieldConfig);
// Skip if it's not a database relation with a resolvable foreign table
if ($fieldConfig['internal_type'] !== 'db' || $allowedTable === false) {
return $relatedUids;
}
$values = GeneralUtility::trimExplode(',', $value, true);
foreach ($values as $groupValue) {
list($foreignIdentifier, $_) = GeneralUtility::trimExplode('|', $groupValue);
list($recordForeignTable, $foreignUid) = BackendUtility::splitTable_Uid($foreignIdentifier);
// skip records that do not match the allowed table
if (!empty($recordForeignTable) && $recordForeignTable !== $allowedTable) {
continue;
}
$relatedUids[] = $foreignUid;
}
return $relatedUids;
}
示例6: renderForeignRecordHeader
/**
* Renders the HTML header for a foreign record, such as the title, toggle-function, drag'n'drop, etc.
* Later on the command-icons are inserted here.
*
* @param string $parentUid The uid of the parent (embedding) record (uid or NEW...)
* @param string $foreign_table The foreign_table we create a header for
* @param array $rec The current record of that foreign_table
* @param array $config content of $PA['fieldConf']['config']
* @param boolean $isVirtualRecord
* @return string The HTML code of the header
* @todo Define visibility
*/
public function renderForeignRecordHeader($parentUid, $foreign_table, $rec, $config, $isVirtualRecord = FALSE)
{
// Init:
$objectId = $this->inlineNames['object'] . self::Structure_Separator . $foreign_table . self::Structure_Separator . $rec['uid'];
// We need the returnUrl of the main script when loading the fields via AJAX-call (to correct wizard code, so include it as 3rd parameter)
// Pre-Processing:
$isOnSymmetricSide = RelationHandler::isOnSymmetricSide($parentUid, $config, $rec);
$hasForeignLabel = !$isOnSymmetricSide && $config['foreign_label'] ? TRUE : FALSE;
$hasSymmetricLabel = $isOnSymmetricSide && $config['symmetric_label'] ? TRUE : FALSE;
// Get the record title/label for a record:
// Try using a self-defined user function only for formatted labels
if (isset($GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc'])) {
$params = array('table' => $foreign_table, 'row' => $rec, 'title' => '', 'isOnSymmetricSide' => $isOnSymmetricSide, 'options' => isset($GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc_options']) ? $GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc_options'] : array(), 'parent' => array('uid' => $parentUid, 'config' => $config));
// callUserFunction requires a third parameter, but we don't want to give $this as reference!
$null = NULL;
GeneralUtility::callUserFunction($GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc'], $params, $null);
$recTitle = $params['title'];
// Try using a normal self-defined user function
} elseif (isset($GLOBALS['TCA'][$foreign_table]['ctrl']['label_userFunc'])) {
$params = array('table' => $foreign_table, 'row' => $rec, 'title' => '', 'isOnSymmetricSide' => $isOnSymmetricSide, 'parent' => array('uid' => $parentUid, 'config' => $config));
// callUserFunction requires a third parameter, but we don't want to give $this as reference!
$null = NULL;
GeneralUtility::callUserFunction($GLOBALS['TCA'][$foreign_table]['ctrl']['label_userFunc'], $params, $null);
$recTitle = $params['title'];
} elseif ($hasForeignLabel || $hasSymmetricLabel) {
$titleCol = $hasForeignLabel ? $config['foreign_label'] : $config['symmetric_label'];
$foreignConfig = $this->getPossibleRecordsSelectorConfig($config, $titleCol);
// Render title for everything else than group/db:
if ($foreignConfig['type'] != 'groupdb') {
$recTitle = BackendUtility::getProcessedValueExtra($foreign_table, $titleCol, $rec[$titleCol], 0, 0, FALSE);
} else {
// $recTitle could be something like: "tx_table_123|...",
$valueParts = GeneralUtility::trimExplode('|', $rec[$titleCol]);
$itemParts = GeneralUtility::revExplode('_', $valueParts[0], 2);
$recTemp = BackendUtility::getRecordWSOL($itemParts[0], $itemParts[1]);
$recTitle = BackendUtility::getRecordTitle($itemParts[0], $recTemp, FALSE);
}
$recTitle = BackendUtility::getRecordTitlePrep($recTitle);
if (trim($recTitle) === '') {
$recTitle = BackendUtility::getNoRecordTitle(TRUE);
}
} else {
$recTitle = BackendUtility::getRecordTitle($foreign_table, $rec, TRUE);
}
$altText = BackendUtility::getRecordIconAltText($rec, $foreign_table);
$iconImg = IconUtility::getSpriteIconForRecord($foreign_table, $rec, array('title' => htmlspecialchars($altText), 'id' => $objectId . '_icon'));
$label = '<span id="' . $objectId . '_label">' . $recTitle . '</span>';
$ctrl = $this->renderForeignRecordHeaderControl($parentUid, $foreign_table, $rec, $config, $isVirtualRecord);
$thumbnail = FALSE;
// Renders a thumbnail for the header
if (!empty($config['appearance']['headerThumbnail']['field'])) {
$fieldValue = $rec[$config['appearance']['headerThumbnail']['field']];
$firstElement = array_shift(GeneralUtility::trimExplode(',', $fieldValue));
$fileUid = array_pop(BackendUtility::splitTable_Uid($firstElement));
if (!empty($fileUid)) {
$fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileObject($fileUid);
if ($fileObject && $fileObject->isMissing()) {
$flashMessage = \TYPO3\CMS\Core\Resource\Utility\BackendUtility::getFlashMessageForMissingFile($fileObject);
$thumbnail = $flashMessage->render();
} elseif ($fileObject) {
$imageSetup = $config['appearance']['headerThumbnail'];
unset($imageSetup['field']);
$imageSetup = array_merge(array('width' => '45', 'height' => '45c'), $imageSetup);
$processedImage = $fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, $imageSetup);
// Only use a thumbnail if the processing was successful.
if (!$processedImage->usesOriginalFile()) {
$imageUrl = $processedImage->getPublicUrl(TRUE);
$thumbnail = '<img class="t3-form-field-header-inline-thumbnail-image" src="' . $imageUrl . '" alt="' . htmlspecialchars($altText) . '" title="' . htmlspecialchars($altText) . '">';
}
}
}
}
if (!empty($config['appearance']['headerThumbnail']['field']) && $thumbnail) {
$headerClasses = ' t3-form-field-header-inline-has-thumbnail';
$mediaContainer = '<div class="t3-form-field-header-inline-thumbnail" id="' . $objectId . '_thumbnailcontainer">' . $thumbnail . '</div>';
} else {
$headerClasses = ' t3-form-field-header-inline-has-icon';
$mediaContainer = '<div class="t3-form-field-header-inline-icon" id="' . $objectId . '_iconcontainer">' . $iconImg . '</div>';
}
$header = '<div class="t3-form-field-header-inline-wrap' . $headerClasses . '">' . '<div class="t3-form-field-header-inline-ctrl">' . $ctrl . '</div>' . '<div class="t3-form-field-header-inline-body">' . $mediaContainer . '<div class="t3-form-field-header-inline-summary">' . $label . '</div>' . '</div>' . '</div>';
return $header;
}
示例7: renderForeignRecordHeader
/**
* Renders the HTML header for a foreign record, such as the title, toggle-function, drag'n'drop, etc.
* Later on the command-icons are inserted here.
*
* @param array $data Current data
* @return string The HTML code of the header
*/
protected function renderForeignRecordHeader(array $data)
{
$languageService = $this->getLanguageService();
$inlineConfig = $data['inlineParentConfig'];
$foreignTable = $inlineConfig['foreign_table'];
$rec = $data['databaseRow'];
// Init:
$domObjectId = $this->inlineStackProcessor->getCurrentStructureDomObjectIdPrefix($data['inlineFirstPid']);
$objectId = $domObjectId . '-' . $foreignTable . '-' . $rec['uid'];
$recordTitle = $data['recordTitle'];
if (empty($recordTitle)) {
$recordTitle = '<em>[' . $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.no_title', true) . ']</em>';
}
$altText = BackendUtility::getRecordIconAltText($rec, $foreignTable);
$iconImg = '<span title="' . $altText . '" id="' . htmlspecialchars($objectId) . '_icon' . '">' . $this->iconFactory->getIconForRecord($foreignTable, $rec, Icon::SIZE_SMALL)->render() . '</span>';
$label = '<span id="' . $objectId . '_label">' . $recordTitle . '</span>';
$ctrl = $this->renderForeignRecordHeaderControl($data);
$thumbnail = false;
// Renders a thumbnail for the header
if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails'] && !empty($inlineConfig['appearance']['headerThumbnail']['field'])) {
$fieldValue = $rec[$inlineConfig['appearance']['headerThumbnail']['field']];
$firstElement = array_shift(GeneralUtility::trimExplode('|', array_shift(GeneralUtility::trimExplode(',', $fieldValue))));
$fileUid = array_pop(BackendUtility::splitTable_Uid($firstElement));
if (!empty($fileUid)) {
try {
$fileObject = ResourceFactory::getInstance()->getFileObject($fileUid);
} catch (\InvalidArgumentException $e) {
$fileObject = null;
}
if ($fileObject && $fileObject->isMissing()) {
$thumbnail .= '<span class="label label-danger">' . htmlspecialchars(static::getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:warning.file_missing')) . '</span> ' . htmlspecialchars($fileObject->getName()) . '<br />';
} elseif ($fileObject) {
$imageSetup = $inlineConfig['appearance']['headerThumbnail'];
unset($imageSetup['field']);
if (!empty($rec['crop'])) {
$imageSetup['crop'] = $rec['crop'];
}
$imageSetup = array_merge(array('width' => '45', 'height' => '45c'), $imageSetup);
$processedImage = $fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, $imageSetup);
// Only use a thumbnail if the processing process was successful by checking if image width is set
if ($processedImage->getProperty('width')) {
$imageUrl = $processedImage->getPublicUrl(true);
$thumbnail = '<img src="' . $imageUrl . '" ' . 'width="' . $processedImage->getProperty('width') . '" ' . 'height="' . $processedImage->getProperty('height') . '" ' . 'alt="' . htmlspecialchars($altText) . '" ' . 'title="' . htmlspecialchars($altText) . '">';
}
}
}
}
if (!empty($inlineConfig['appearance']['headerThumbnail']['field']) && $thumbnail) {
$mediaContainer = '<div class="form-irre-header-cell form-irre-header-thumbnail" id="' . $objectId . '_thumbnailcontainer">' . $thumbnail . '</div>';
} else {
$mediaContainer = '<div class="form-irre-header-cell form-irre-header-icon" id="' . $objectId . '_iconcontainer">' . $iconImg . '</div>';
}
$header = $mediaContainer . '
<div class="form-irre-header-cell form-irre-header-body">' . $label . '</div>
<div class="form-irre-header-cell form-irre-header-control t3js-formengine-irre-control">' . $ctrl . '</div>';
return $header;
}
示例8: tt_content_drawItem
/**
* Draws the preview content for a content element
*
* @param string $row Content element
* @param boolean $isRTE Set if the RTE link can be created.
* @return string HTML
* @throws \UnexpectedValueException
* @todo Define visibility
*/
public function tt_content_drawItem($row, $isRTE = FALSE)
{
$out = '';
$outHeader = '';
// Make header:
if ($row['header']) {
$infoArr = array();
$this->getProcessedValue('tt_content', 'header_position,header_layout,header_link', $row, $infoArr);
$hiddenHeaderNote = '';
// If header layout is set to 'hidden', display an accordant note:
if ($row['header_layout'] == 100) {
$hiddenHeaderNote = ' <em>[' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.hidden', TRUE) . ']</em>';
}
$outHeader = $row['date'] ? htmlspecialchars($this->itemLabels['date'] . ' ' . BackendUtility::date($row['date'])) . '<br />' : '';
$outHeader .= '<strong>' . $this->linkEditContent($this->renderText($row['header']), $row) . $hiddenHeaderNote . '</strong><br />';
}
// Make content:
$infoArr = array();
$drawItem = TRUE;
// Hook: Render an own preview of a record
$drawItemHooks =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'];
if (is_array($drawItemHooks)) {
foreach ($drawItemHooks as $hookClass) {
$hookObject = GeneralUtility::getUserObj($hookClass);
if (!$hookObject instanceof PageLayoutViewDrawItemHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Backend\\View\\PageLayoutViewDrawItemHookInterface', 1218547409);
}
$hookObject->preProcess($this, $drawItem, $outHeader, $out, $row);
}
}
// Draw preview of the item depending on its CType (if not disabled by previous hook):
if ($drawItem) {
switch ($row['CType']) {
case 'header':
if ($row['subheader']) {
$out .= $this->linkEditContent($this->renderText($row['subheader']), $row) . '<br />';
}
break;
case 'text':
case 'textpic':
case 'image':
if ($row['CType'] == 'text' || $row['CType'] == 'textpic') {
if ($row['bodytext']) {
$out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
}
}
if ($row['CType'] == 'textpic' || $row['CType'] == 'image') {
if ($row['image']) {
$out .= $this->thumbCode($row, 'tt_content', 'image') . '<br />';
if ($row['imagecaption']) {
$out .= $this->linkEditContent($this->renderText($row['imagecaption']), $row) . '<br />';
}
}
}
break;
case 'bullets':
case 'table':
case 'mailform':
if ($row['bodytext']) {
$out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
}
break;
case 'uploads':
if ($row['media']) {
$out .= $this->thumbCode($row, 'tt_content', 'media') . '<br />';
}
break;
case 'multimedia':
if ($row['multimedia']) {
$out .= $this->renderText($row['multimedia']) . '<br />';
$out .= $this->renderText($row['parameters']) . '<br />';
}
break;
case 'menu':
if ($row['pages']) {
$out .= $this->linkEditContent($row['pages'], $row) . '<br />';
}
break;
case 'shortcut':
if (!empty($row['records'])) {
$shortcutContent = array();
$recordList = explode(',', $row['records']);
foreach ($recordList as $recordIdentifier) {
$split = BackendUtility::splitTable_Uid($recordIdentifier);
$tableName = empty($split[0]) ? 'tt_content' : $split[0];
$shortcutRecord = BackendUtility::getRecord($tableName, $split[1]);
if (is_array($shortcutRecord)) {
$icon = IconUtility::getSpriteIconForRecord($tableName, $shortcutRecord);
$onClick = $this->getPageLayoutController()->doc->wrapClickMenuOnIcon($icon, $tableName, $shortcutRecord['uid'], 1, '', '+copy,info,edit,view', TRUE);
$shortcutContent[] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . $icon . '</a>' . htmlspecialchars(BackendUtility::getRecordTitle($tableName, $shortcutRecord));
}
//.........这里部分代码省略.........
示例9: getSingleField_typeGroup
//.........这里部分代码省略.........
$imgs[] = '<span class="nobr">' . $imgTag . htmlspecialchars($fileObject->getName()) . '</span>';
}
} else {
$rowCopy = array();
$rowCopy[$field] = $imgPath;
$thumbnailCode = '';
try {
$thumbnailCode = BackendUtility::thumbCode($rowCopy, $table, $field, $this->backPath, 'thumbs.php', $config['uploadfolder'], 0, ' align="middle"');
$thumbnailCode = '<span class="nobr">' . $thumbnailCode . $imgPath . '</span>';
} catch (\Exception $exception) {
/** @var $flashMessage FlashMessage */
$message = $exception->getMessage();
$flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', htmlspecialchars($message), '', FlashMessage::ERROR, TRUE);
$class = 'TYPO3\\CMS\\Core\\Messaging\\FlashMessageService';
/** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
$flashMessageService = GeneralUtility::makeInstance($class);
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
$defaultFlashMessageQueue->enqueue($flashMessage);
$logMessage = $message . ' (' . $table . ':' . $row['uid'] . ')';
GeneralUtility::sysLog($logMessage, 'core', GeneralUtility::SYSLOG_SEVERITY_WARNING);
}
$imgs[] = $thumbnailCode;
}
}
$thumbsnail = implode('<br />', $imgs);
}
// Creating the element:
$params = array('size' => $size, 'dontShowMoveIcons' => $maxitems <= 1, 'autoSizeMax' => MathUtility::forceIntegerInRange($config['autoSizeMax'], 0), 'maxitems' => $maxitems, 'style' => isset($config['selectedListStyle']) ? ' style="' . htmlspecialchars($config['selectedListStyle']) . '"' : ' style="' . $this->defaultMultipleSelectorStyle . '"', 'info' => $info, 'thumbnails' => $thumbsnail, 'readOnly' => $disabled, 'noBrowser' => $noList || isset($config['disable_controls']) && GeneralUtility::inList($config['disable_controls'], 'browser'), 'noList' => $noList, 'noDelete' => $noDelete);
$item .= $this->dbFileIcons($PA['itemFormElName'], 'file', implode(',', $tempFT), $itemArray, '', $params, $PA['onFocus'], '', '', '', $config);
if (!$disabled && !(isset($config['disable_controls']) && GeneralUtility::inList($config['disable_controls'], 'upload'))) {
// Adding the upload field:
if ($this->edit_docModuleUpload && $config['uploadfolder']) {
// Insert the multiple attribute to enable HTML5 multiple file upload
$multipleAttribute = '';
$multipleFilenameSuffix = '';
if (isset($config['maxitems']) && $config['maxitems'] > 1) {
$multipleAttribute = ' multiple="multiple"';
$multipleFilenameSuffix = '[]';
}
$item .= '<div id="' . $PA['itemFormElID_file'] . '"><input type="file"' . $multipleAttribute . ' name="' . $PA['itemFormElName_file'] . $multipleFilenameSuffix . '" size="35" onchange="' . implode('', $PA['fieldChangeFunc']) . '" /></div>';
}
}
break;
case 'folder':
// If the element is of the internal type "folder":
// Array of folder items:
$itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], TRUE);
// Creating the element:
$params = array('size' => $size, 'dontShowMoveIcons' => $maxitems <= 1, 'autoSizeMax' => MathUtility::forceIntegerInRange($config['autoSizeMax'], 0), 'maxitems' => $maxitems, 'style' => isset($config['selectedListStyle']) ? ' style="' . htmlspecialchars($config['selectedListStyle']) . '"' : ' style="' . $this->defaultMultipleSelectorStyle . '"', 'info' => $info, 'readOnly' => $disabled, 'noBrowser' => $noList || isset($config['disable_controls']) && GeneralUtility::inList($config['disable_controls'], 'browser'), 'noList' => $noList);
$item .= $this->dbFileIcons($PA['itemFormElName'], 'folder', '', $itemArray, '', $params, $PA['onFocus']);
break;
case 'db':
// If the element is of the internal type "db":
// Creating string showing allowed types:
$tempFT = GeneralUtility::trimExplode(',', $allowed, TRUE);
$onlySingleTableAllowed = FALSE;
if (trim($tempFT[0]) === '*') {
$info .= '<span class="nobr">' . htmlspecialchars($this->getLL('l_allTables')) . '</span><br />';
} elseif ($tempFT) {
$onlySingleTableAllowed = count($tempFT) == 1;
foreach ($tempFT as $theT) {
$aOnClick = 'setFormValueOpenBrowser(\'db\', \'' . ($PA['itemFormElName'] . '|||' . $theT) . '\'); return false;';
$info .= '<span class="nobr">
<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . IconUtility::getSpriteIconForRecord($theT, array()) . htmlspecialchars($this->sL($GLOBALS['TCA'][$theT]['ctrl']['title'])) . '</a></span><br />';
}
}
$perms_clause = $this->getBackendUserAuthentication()->getPagePermsClause(1);
$itemArray = array();
$imgs = array();
// Thumbnails:
$temp_itemArray = GeneralUtility::trimExplode(',', $PA['itemFormElValue'], TRUE);
foreach ($temp_itemArray as $dbRead) {
$recordParts = explode('|', $dbRead);
list($this_table, $this_uid) = BackendUtility::splitTable_Uid($recordParts[0]);
// For the case that no table was found and only a single table is defined to be allowed, use that one:
if (!$this_table && $onlySingleTableAllowed) {
$this_table = $allowed;
}
$itemArray[] = array('table' => $this_table, 'id' => $this_uid);
if (!$disabled && $show_thumbs) {
$rr = BackendUtility::getRecordWSOL($this_table, $this_uid);
$imgs[] = '<span class="nobr">' . $this->getClickMenu(IconUtility::getSpriteIconForRecord($this_table, $rr, array('style' => 'vertical-align:top', 'title' => htmlspecialchars(BackendUtility::getRecordPath($rr['pid'], $perms_clause, 15) . ' [UID: ' . $rr['uid'] . ']'))), $this_table, $this_uid) . ' ' . BackendUtility::getRecordTitle($this_table, $rr, TRUE) . ' <span class="typo3-dimmed"><em>[' . $rr['uid'] . ']</em></span>' . '</span>';
}
}
$thumbsnail = '';
if (!$disabled && $show_thumbs) {
$thumbsnail = implode('<br />', $imgs);
}
// Creating the element:
$params = array('size' => $size, 'dontShowMoveIcons' => $maxitems <= 1, 'autoSizeMax' => MathUtility::forceIntegerInRange($config['autoSizeMax'], 0), 'maxitems' => $maxitems, 'style' => isset($config['selectedListStyle']) ? ' style="' . htmlspecialchars($config['selectedListStyle']) . '"' : ' style="' . $this->defaultMultipleSelectorStyle . '"', 'info' => $info, 'thumbnails' => $thumbsnail, 'readOnly' => $disabled, 'noBrowser' => $noList || isset($config['disable_controls']) && GeneralUtility::inList($config['disable_controls'], 'browser'), 'noList' => $noList);
$item .= $this->dbFileIcons($PA['itemFormElName'], 'db', implode(',', $tempFT), $itemArray, '', $params, $PA['onFocus'], $table, $field, $row['uid'], $config);
break;
}
// Wizards:
$altItem = '<input type="hidden" name="' . $PA['itemFormElName'] . '" value="' . htmlspecialchars($PA['itemFormElValue']) . '" />';
if (!$disabled) {
$item = $this->renderWizards(array($item, $altItem), $config['wizards'], $table, $row, $field, $PA, $PA['itemFormElName'], $specConf);
}
return $item;
}
示例10: getPlaceholderAttribute
/**
* Determine and get the value for the placeholder and return the placeholder attribute
*
* @param string $table
* @param string $field
* @param array $config
* @param array $row
* @return string
*/
protected function getPlaceholderAttribute($table, $field, array $config, array $row)
{
$value = trim($config['placeholder']);
if (!$value) {
return '';
}
// Check if we have a reference to another field value from the current record
if (substr($value, 0, 6) === '__row|') {
$keySegments = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', substr($value, 6));
if (isset($row[$keySegments[0]])) {
// First segment (fieldname) exists in the current row
$value = $row[$keySegments[0]];
$fieldConf = $GLOBALS['TCA'][$table]['columns'][$keySegments[0]];
if ($fieldConf['config']['type'] === 'group' && $fieldConf['config']['internal_type'] === 'db') {
// The field is a relation to another record
list($foreignIdentifier, $foreignTitle) = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $value);
// Use the foreign title
$value = $foreignTitle;
if (!empty($keySegments[1])) {
// Use any field in the foreign record
list($foreignTable, $foreignUid) = \TYPO3\CMS\Backend\Utility\BackendUtility::splitTable_Uid($foreignIdentifier);
$foreignRecord = \t3lib_befunc::getRecord($foreignTable, $foreignUid);
if (isset($foreignRecord[$keySegments[1]])) {
$value = $foreignRecord[$keySegments[1]];
}
}
} elseif (!empty($keySegments[1]) && isset($row[$keySegments[0]][$keySegments[1]])) {
$value = $row[$keySegments[0]][$keySegments[1]];
}
}
}
// Cleanup the string and support 'LLL:'
$value = htmlspecialchars(trim($this->sL($value)));
return empty($value) ? '' : ' placeholder="' . $value . '" ';
}
示例11: renderForeignRecordHeader
/**
* Renders the HTML header for a foreign record, such as the title, toggle-function, drag'n'drop, etc.
* Later on the command-icons are inserted here.
*
* @param string $parentUid The uid of the parent (embedding) record (uid or NEW...)
* @param string $foreign_table The foreign_table we create a header for
* @param array $rec The current record of that foreign_table
* @param array $config content of $PA['fieldConf']['config']
* @param boolean $isVirtualRecord
* @return string The HTML code of the header
* @todo Define visibility
*/
public function renderForeignRecordHeader($parentUid, $foreign_table, $rec, $config, $isVirtualRecord = FALSE)
{
// Init:
$objectId = $this->inlineNames['object'] . self::Structure_Separator . $foreign_table . self::Structure_Separator . $rec['uid'];
// We need the returnUrl of the main script when loading the fields via AJAX-call (to correct wizard code, so include it as 3rd parameter)
// Pre-Processing:
$isOnSymmetricSide = \TYPO3\CMS\Core\Database\RelationHandler::isOnSymmetricSide($parentUid, $config, $rec);
$hasForeignLabel = !$isOnSymmetricSide && $config['foreign_label'] ? TRUE : FALSE;
$hasSymmetricLabel = $isOnSymmetricSide && $config['symmetric_label'] ? TRUE : FALSE;
// Get the record title/label for a record:
// render using a self-defined user function
if ($GLOBALS['TCA'][$foreign_table]['ctrl']['label_userFunc']) {
$params = array('table' => $foreign_table, 'row' => $rec, 'title' => '', 'isOnSymmetricSide' => $isOnSymmetricSide, 'parent' => array('uid' => $parentUid, 'config' => $config));
// callUserFunction requires a third parameter, but we don't want to give $this as reference!
$null = NULL;
\TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($GLOBALS['TCA'][$foreign_table]['ctrl']['label_userFunc'], $params, $null);
$recTitle = $params['title'];
} elseif ($hasForeignLabel || $hasSymmetricLabel) {
$titleCol = $hasForeignLabel ? $config['foreign_label'] : $config['symmetric_label'];
$foreignConfig = $this->getPossibleRecordsSelectorConfig($config, $titleCol);
// Render title for everything else than group/db:
if ($foreignConfig['type'] != 'groupdb') {
$recTitle = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValueExtra($foreign_table, $titleCol, $rec[$titleCol], 0, 0, FALSE);
} else {
// $recTitle could be something like: "tx_table_123|...",
$valueParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $rec[$titleCol]);
$itemParts = \TYPO3\CMS\Core\Utility\GeneralUtility::revExplode('_', $valueParts[0], 2);
$recTemp = \t3lib_befunc::getRecordWSOL($itemParts[0], $itemParts[1]);
$recTitle = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($itemParts[0], $recTemp, FALSE);
}
$recTitle = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitlePrep($recTitle);
if (!strcmp(trim($recTitle), '')) {
$recTitle = \TYPO3\CMS\Backend\Utility\BackendUtility::getNoRecordTitle(TRUE);
}
} else {
$recTitle = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($foreign_table, $rec, TRUE);
}
// Renders a thumbnail for the header
if (!empty($config['appearance']['headerThumbnail']['field'])) {
$fieldValue = $rec[$config['appearance']['headerThumbnail']['field']];
$firstElement = array_shift(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $fieldValue));
$fileUid = array_pop(\TYPO3\CMS\Backend\Utility\BackendUtility::splitTable_Uid($firstElement));
if (!empty($fileUid)) {
$fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileObject($fileUid);
if ($fileObject) {
$imageSetup = $config['appearance']['headerThumbnail'];
unset($imageSetup['field']);
$imageSetup = array_merge(array('width' => 64, 'height' => 64), $imageSetup);
$imageUrl = $fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, $imageSetup)->getPublicUrl(TRUE);
$thumbnail = '<img src="' . $imageUrl . '" alt="' . htmlspecialchars($recTitle) . '">';
} else {
$thumbnail = FALSE;
}
}
}
$altText = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordIconAltText($rec, $foreign_table);
$iconImg = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($foreign_table, $rec, array('title' => htmlspecialchars($altText), 'id' => $objectId . '_icon'));
$label = '<span id="' . $objectId . '_label">' . $recTitle . '</span>';
$ctrl = $this->renderForeignRecordHeaderControl($parentUid, $foreign_table, $rec, $config, $isVirtualRecord);
$header = '<table>' . '<tr>' . (!empty($config['appearance']['headerThumbnail']['field']) && $thumbnail ? '<td class="t3-form-field-header-inline-thumbnail" id="' . $objectId . '_thumbnailcontainer">' . $thumbnail . '</td>' : '<td class="t3-form-field-header-inline-icon" id="' . $objectId . '_iconcontainer">' . $iconImg . '</td>') . '<td class="t3-form-field-header-inline-summary">' . $label . '</td>' . '<td clasS="t3-form-field-header-inline-ctrl">' . $ctrl . '</td>' . '</tr>' . '</table>';
return $header;
}
示例12: getRelatedGroupFieldUids
/**
* Tries to get the related UIDs of a group field.
*
* @param array $fieldConfig "config" section from the TCA for the current field.
* @param string $value The current value (normally a comma separated record list, possibly consisting of multiple parts [table]_[uid]|[title]).
* @return array Array of related UIDs.
*/
protected function getRelatedGroupFieldUids(array $fieldConfig, $value)
{
$relatedUids = array();
$allowedTable = $this->getAllowedTableForGroupField($fieldConfig);
if ($fieldConfig['internal_type'] !== 'db' || $allowedTable === FALSE) {
return $relatedUids;
}
$values = GeneralUtility::trimExplode(',', $value, TRUE);
foreach ($values as $groupValue) {
list($foreignIdentifier, $foreignTitle) = GeneralUtility::trimExplode('|', $groupValue);
list($recordForeignTable, $foreignUid) = BackendUtility::splitTable_Uid($foreignIdentifier);
// skip records that do not match the allowed table
if (!empty($recordForeignTable) && $recordForeignTable !== $allowedTable) {
continue;
}
if (!empty($foreignTitle)) {
$this->alternativeFieldValue = rawurldecode($foreignTitle);
}
$relatedUids[] = $foreignUid;
}
if (count($relatedUids) > 0) {
$this->currentTable = $allowedTable;
}
return $relatedUids;
}
示例13: renderForeignRecordHeader
/**
* Renders the HTML header for a foreign record, such as the title, toggle-function, drag'n'drop, etc.
* Later on the command-icons are inserted here.
*
* @param string $parentUid The uid of the parent (embedding) record (uid or NEW...)
* @param string $foreign_table The foreign_table we create a header for
* @param array $data Current data
* @param array $config content of $PA['fieldConf']['config']
* @param bool $isVirtualRecord
* @return string The HTML code of the header
*/
protected function renderForeignRecordHeader($parentUid, $foreign_table, $data, $config, $isVirtualRecord = false)
{
$rec = $data['databaseRow'];
// Init:
$domObjectId = $this->inlineStackProcessor->getCurrentStructureDomObjectIdPrefix($this->data['inlineFirstPid']);
$objectId = $domObjectId . '-' . $foreign_table . '-' . $rec['uid'];
// We need the returnUrl of the main script when loading the fields via AJAX-call (to correct wizard code, so include it as 3rd parameter)
// Pre-Processing:
$isOnSymmetricSide = RelationHandler::isOnSymmetricSide($parentUid, $config, $rec);
$hasForeignLabel = (bool) (!$isOnSymmetricSide && $config['foreign_label']);
$hasSymmetricLabel = (bool) $isOnSymmetricSide && $config['symmetric_label'];
// Get the record title/label for a record:
// Try using a self-defined user function only for formatted labels
if (isset($GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc'])) {
$params = array('table' => $foreign_table, 'row' => $rec, 'title' => '', 'isOnSymmetricSide' => $isOnSymmetricSide, 'options' => isset($GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc_options']) ? $GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc_options'] : array(), 'parent' => array('uid' => $parentUid, 'config' => $config));
// callUserFunction requires a third parameter, but we don't want to give $this as reference!
$null = null;
GeneralUtility::callUserFunction($GLOBALS['TCA'][$foreign_table]['ctrl']['formattedLabel_userFunc'], $params, $null);
$recTitle = $params['title'];
// Try using a normal self-defined user function
} elseif (isset($GLOBALS['TCA'][$foreign_table]['ctrl']['label_userFunc'])) {
$recTitle = $data['recordTitle'];
} elseif ($hasForeignLabel || $hasSymmetricLabel) {
$titleCol = $hasForeignLabel ? $config['foreign_label'] : $config['symmetric_label'];
// Render title for everything else than group/db:
if (isset($this->data['processedTca']['columns'][$titleCol]['config']['type']) && $this->data['processedTca']['columns'][$titleCol]['config']['type'] === 'group' && isset($this->data['processedTca']['columns'][$titleCol]['config']['internal_type']) && $this->data['processedTca']['columns'][$titleCol]['config']['internal_type'] === 'db') {
$recTitle = BackendUtility::getProcessedValueExtra($foreign_table, $titleCol, $rec[$titleCol], 0, 0, false);
} else {
// $recTitle could be something like: "tx_table_123|...",
$valueParts = GeneralUtility::trimExplode('|', $rec[$titleCol]);
$itemParts = GeneralUtility::revExplode('_', $valueParts[0], 2);
$recTemp = BackendUtility::getRecordWSOL($itemParts[0], $itemParts[1]);
$recTitle = BackendUtility::getRecordTitle($itemParts[0], $recTemp, false);
}
$recTitle = BackendUtility::getRecordTitlePrep($recTitle);
if (trim($recTitle) === '') {
$recTitle = BackendUtility::getNoRecordTitle(true);
}
} else {
$recTitle = BackendUtility::getRecordTitle($foreign_table, FormEngineUtility::databaseRowCompatibility($rec), true);
}
$altText = BackendUtility::getRecordIconAltText($rec, $foreign_table);
$iconImg = '<span title="' . $altText . '" id="' . htmlspecialchars($objectId) . '_icon' . '">' . $this->iconFactory->getIconForRecord($foreign_table, $rec, Icon::SIZE_SMALL)->render() . '</span>';
$label = '<span id="' . $objectId . '_label">' . $recTitle . '</span>';
$ctrl = $this->renderForeignRecordHeaderControl($parentUid, $foreign_table, $data, $config, $isVirtualRecord);
$thumbnail = false;
// Renders a thumbnail for the header
if (!empty($config['appearance']['headerThumbnail']['field'])) {
$fieldValue = $rec[$config['appearance']['headerThumbnail']['field']];
$firstElement = array_shift(GeneralUtility::trimExplode('|', array_shift(GeneralUtility::trimExplode(',', $fieldValue))));
$fileUid = array_pop(BackendUtility::splitTable_Uid($firstElement));
if (!empty($fileUid)) {
$fileObject = ResourceFactory::getInstance()->getFileObject($fileUid);
if ($fileObject && $fileObject->isMissing()) {
$flashMessage = \TYPO3\CMS\Core\Resource\Utility\BackendUtility::getFlashMessageForMissingFile($fileObject);
$thumbnail = $flashMessage->render();
} elseif ($fileObject) {
$imageSetup = $config['appearance']['headerThumbnail'];
unset($imageSetup['field']);
if (!empty($rec['crop'])) {
$imageSetup['crop'] = $rec['crop'];
}
$imageSetup = array_merge(array('width' => '45', 'height' => '45c'), $imageSetup);
$processedImage = $fileObject->process(ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, $imageSetup);
// Only use a thumbnail if the processing process was successful by checking if image width is set
if ($processedImage->getProperty('width')) {
$imageUrl = $processedImage->getPublicUrl(true);
$thumbnail = '<img src="' . $imageUrl . '" ' . 'width="' . $processedImage->getProperty('width') . '" ' . 'height="' . $processedImage->getProperty('height') . '" ' . 'alt="' . htmlspecialchars($altText) . '" ' . 'title="' . htmlspecialchars($altText) . '">';
}
}
}
}
if (!empty($config['appearance']['headerThumbnail']['field']) && $thumbnail) {
$mediaContainer = '<div class="form-irre-header-cell form-irre-header-thumbnail" id="' . $objectId . '_thumbnailcontainer">' . $thumbnail . '</div>';
} else {
$mediaContainer = '<div class="form-irre-header-cell form-irre-header-icon" id="' . $objectId . '_iconcontainer">' . $iconImg . '</div>';
}
$header = $mediaContainer . '
<div class="form-irre-header-cell form-irre-header-body">' . $label . '</div>
<div class="form-irre-header-cell form-irre-header-control t3js-formengine-irre-control">' . $ctrl . '</div>';
return $header;
}
示例14: tt_content_drawItem
//.........这里部分代码省略.........
case 'header':
if ($row['subheader']) {
$out .= $this->linkEditContent($this->renderText($row['subheader']), $row) . '<br />';
}
break;
case 'bullets':
case 'table':
if ($row['bodytext']) {
$out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
}
break;
case 'uploads':
if ($row['media']) {
$out .= $this->linkEditContent($this->getThumbCodeUnlinked($row, 'tt_content', 'media'), $row) . '<br />';
}
break;
case 'menu':
$contentType = $this->CType_labels[$row['CType']];
$out .= $this->linkEditContent('<strong>' . htmlspecialchars($contentType) . '</strong>', $row) . '<br />';
// Add Menu Type
$menuTypeLabel = $this->getLanguageService()->sL(BackendUtility::getLabelFromItemListMerged($row['pid'], 'tt_content', 'menu_type', $row['menu_type']));
$menuTypeLabel = $menuTypeLabel ?: 'invalid menu type';
$out .= $this->linkEditContent($menuTypeLabel, $row);
if ($row['menu_type'] !== '2' && ($row['pages'] || $row['selected_categories'])) {
// Show pages if menu type is not "Sitemap"
$out .= ':' . $this->linkEditContent($this->generateListForCTypeMenu($row), $row) . '<br />';
}
break;
case 'shortcut':
if (!empty($row['records'])) {
$shortcutContent = array();
$recordList = explode(',', $row['records']);
foreach ($recordList as $recordIdentifier) {
$split = BackendUtility::splitTable_Uid($recordIdentifier);
$tableName = empty($split[0]) ? 'tt_content' : $split[0];
$shortcutRecord = BackendUtility::getRecord($tableName, $split[1]);
if (is_array($shortcutRecord)) {
$icon = $this->iconFactory->getIconForRecord($tableName, $shortcutRecord, Icon::SIZE_SMALL)->render();
$icon = BackendUtility::wrapClickMenuOnIcon($icon, $tableName, $shortcutRecord['uid'], 1, '', '+copy,info,edit,view');
$shortcutContent[] = $icon . htmlspecialchars(BackendUtility::getRecordTitle($tableName, $shortcutRecord));
}
}
$out .= implode('<br />', $shortcutContent) . '<br />';
}
break;
case 'list':
$hookArr = array();
$hookOut = '';
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']])) {
$hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info'][$row['list_type']];
} elseif (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'])) {
$hookArr = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['_DEFAULT'];
}
if (!empty($hookArr)) {
$_params = array('pObj' => &$this, 'row' => $row, 'infoArr' => $infoArr);
foreach ($hookArr as $_funcRef) {
$hookOut .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
}
}
if ((string) $hookOut !== '') {
$out .= $hookOut;
} elseif (!empty($row['list_type'])) {
$label = BackendUtility::getLabelFromItemListMerged($row['pid'], 'tt_content', 'list_type', $row['list_type']);
if (!empty($label)) {
$out .= $this->linkEditContent('<strong>' . $this->getLanguageService()->sL($label, true) . '</strong>', $row) . '<br />';
} else {