/** * Returns a record icon with title and edit link * * @param string Table name (tt_content,...) * @param array Record array * @param boolean For pages records the rootline will be rendered * @return string Rendered icon */ function getRecordInfoEditLink($refTable, $row, $showRootline = FALSE) { global $BACK_PATH, $LANG, $TCA; // Create record title or rootline for pages if option is selected if ($refTable === 'pages' and $showRootline) { $elementTitle = t3lib_BEfunc::getRecordPath($row['uid'], '1=1', 0); $elementTitle = t3lib_div::fixed_lgd_cs($elementTitle, -$BE_USER->uc['titleLen']); } else { $elementTitle = t3lib_BEfunc::getRecordTitle($refTable, $row, 1); } // Create icon for record if ($refTable === 'tx_dam') { $elementIcon = tx_dam_guiFunc::icon_getFileTypeImgTag($row, 'class="c-recicon" align="top"'); } else { $iconAltText = t3lib_BEfunc::getRecordIconAltText($row, $refTable); // Prepend table description for non-pages tables if (!($refTable === 'pages')) { $iconAltText = htmlspecialchars($LANG->sl($TCA[$refTable]['ctrl']['title']) . ': ') . $iconAltText; } $elementIcon = t3lib_iconworks::getIconImage($refTable, $row, $BACK_PATH, 'class="c-recicon" align="top" title="' . $iconAltText . '"'); } // Return item with edit link return tx_dam_SCbase::wrapLink_edit($elementIcon . $elementTitle, $refTable, $row['uid']); }