当前位置: 首页>>代码示例>>PHP>>正文


PHP t3lib_BEfunc::getRecordIconAltText方法代码示例

本文整理汇总了PHP中t3lib_BEfunc::getRecordIconAltText方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::getRecordIconAltText方法的具体用法?PHP t3lib_BEfunc::getRecordIconAltText怎么用?PHP t3lib_BEfunc::getRecordIconAltText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t3lib_BEfunc的用法示例。


在下文中一共展示了t3lib_BEfunc::getRecordIconAltText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 /**
  * Render javascript in header
  *
  * @return string the rendered page info icon
  * @see template::getPageInfo() Note: can't call this method as it's protected!
  */
 public function render()
 {
     $doc = $this->getDocInstance();
     $id = t3lib_div::_GP('id');
     $pageRecord = t3lib_BEfunc::readPageAccess($id, $GLOBALS['BE_USER']->getPagePermsClause(1));
     // Add icon with clickmenu, etc:
     if ($pageRecord['uid']) {
         // If there IS a real page
         $alttext = t3lib_BEfunc::getRecordIconAltText($pageRecord, 'pages');
         $iconImg = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
         // Make Icon:
         $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
     } else {
         // On root-level of page tree
         // Make Icon
         $iconImg = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" />';
         if ($BE_USER->user['admin']) {
             $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
         } else {
             $theIcon = $iconImg;
         }
     }
     // Setting icon with clickmenu + uid
     $pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
     return $pageInfo;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:32,代码来源:PageInfoViewHelper.php

示例2: displayWorkspaceOverview_pageTreeIconTitle

 /**
  * Create indentation, icon and title for the page tree identification for the list.
  *
  * @param	integer		Page UID (record will be looked up again)
  * @param	string		Page title
  * @param	integer		Depth counter from displayWorkspaceOverview_list() used to indent the icon and title
  * @return	string		HTML content
  */
 function displayWorkspaceOverview_pageTreeIconTitle($pageUid, $title, $indentCount)
 {
     $pRec = t3lib_BEfunc::getRecord('pages', $pageUid);
     return '<img src="clear.gif" width="1" height="1" hspace="' . $indentCount * $this->pageTreeIndent . '" align="top" alt="" />' . t3lib_iconWorks::getIconImage('pages', $pRec, $this->doc->backPath, ' align="top" title="' . t3lib_BEfunc::getRecordIconAltText($pRec, 'pages') . '"') . htmlspecialchars(t3lib_div::fixed_lgd_cs($title, $this->pageTreeIndent_titleLgd)) . '&nbsp;&nbsp;';
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:13,代码来源:class.wslib_gui.php

示例3: getItemColumns

 /**
  * Renders the data columns
  *
  * @param	array		$item item array
  * @return	array
  */
 function getItemColumns($item)
 {
     // Columns rendering
     $columns = array();
     foreach ($this->columnList as $field => $descr) {
         switch ($field) {
             case 'page':
                 // Create output item for pages record
                 $pageRow = $item[$field];
                 $rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
                 $pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
                 $iconAltText = t3lib_BEfunc::getRecordIconAltText($pageRow, 'pages');
                 $icon = t3lib_iconWorks::getIconImage('pages', $pageRow, $GLOBALS['BACK_PATH'], 'title="' . $iconAltText . '" align="top"');
                 if ($this->showRootline) {
                     $title = t3lib_BEfunc::getRecordPath($pageRow['uid'], '1=1', 0);
                     $title = t3lib_div::fixed_lgd_cs($title, -$GLOBALS['BE_USER']->uc['titleLen']);
                 } else {
                     $title = t3lib_BEfunc::getRecordTitle('pages', $pageRow, TRUE);
                 }
                 if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
                     if ($this->enableContextMenus) {
                         $columns[$field] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, 'pages', $pageRow['uid'], 1, '', '+view,edit,info') . $title;
                     } else {
                         $columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
                     }
                 } else {
                     if ($this->enableContextMenus) {
                         $columns[$field] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, 'pages', $pageRow['uid'], 1, '', '+edit,info') . $title;
                     } else {
                         $columns[$field] = $icon . $title;
                     }
                 }
                 break;
             case 'content_element':
                 // Create output item for content record
                 $refTable = $item['tablenames'];
                 $refRow = $item[$field];
                 if ($refTable == 'pages') {
                     // The reference to the media is on a field of a page record
                     if ($GLOBALS['BE_USER']->isInWebMount($refRow['uid']) && $GLOBALS['BE_USER']->doesUserHaveAccess($refRow, 1)) {
                         $columns[$field] = tx_dam_SCbase::getRecordInfoEditLink($refTable, $refRow);
                     } else {
                         $pageRow = $refRow;
                         $rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
                         $pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
                         $iconAltText = t3lib_BEfunc::getRecordIconAltText($refRow, $refTable);
                         $icon = t3lib_iconworks::getIconImage($refTable, $refRow, $GLOBALS['BACK_PATH'], 'class="c-recicon" align="top" title="' . $iconAltText . '"');
                         $title = t3lib_BEfunc::getRecordTitle($refTable, $refRow, 1);
                         if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
                             $columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
                         } else {
                             $columns[$field] = $icon . $title;
                         }
                     }
                 } else {
                     // The reference to the media is on a field of a content element record
                     if ($GLOBALS['BE_USER']->isInWebMount($pageRow['uid']) && $GLOBALS['BE_USER']->doesUserHaveAccess($pageRow, 1)) {
                         $columns[$field] = tx_dam_SCbase::getRecordInfoEditLink($refTable, $refRow);
                     } else {
                         $pageRow = $item['page'];
                         $rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
                         $pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
                         $iconAltText = t3lib_BEfunc::getRecordIconAltText($refRow, $refTable);
                         $icon = t3lib_iconworks::getIconImage($refTable, $refRow, $GLOBALS['BACK_PATH'], 'class="c-recicon" align="top" title="' . $iconAltText . '"');
                         $title = t3lib_BEfunc::getRecordTitle($refTable, $refRow, 1);
                         if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
                             $columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
                         } else {
                             $columns[$field] = $icon . $title;
                         }
                     }
                 }
                 break;
             case 'content_field':
                 // Create output item for reference field
                 $columns[$field] = $item[$field];
                 break;
             case 'softref_key':
                 // Create output item for reference key
                 $columns[$field] = $item['softref_key'] ? $GLOBALS['LANG']->sl('LLL:EXT:dam/lib/locallang.xml:softref_key_' . $item['softref_key']) : $GLOBALS['LANG']->sl('LLL:EXT:dam/lib/locallang.xml:softref_key_media');
                 break;
             case 'content_age':
                 // Create output text describing the age of the content element
                 $columns[$field] = t3lib_BEfunc::dateTimeAge($item[$field], 1);
                 break;
             case 'media_element':
                 // Create output item for tx_dam record
                 $columns[$field] = tx_dam_SCbase::getRecordInfoEditLink('tx_dam', $item);
                 break;
             case 'media_element_age':
                 // Create output text describing the tx_dam record age
                 $columns[$field] = t3lib_BEfunc::dateTimeAge($item['tstamp'], 1);
                 break;
             case '_CLIPBOARD_':
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.tx_dam_listreferences.php

示例4: getRecordHeader

 /**
  * Create record header (includes teh record icon, record title etc.)
  *
  * @param	array		Record row.
  * @return	string		HTML
  */
 function getRecordHeader($row)
 {
     $line = t3lib_iconWorks::getSpriteIconForRecord('tt_content', $row, array('title' => htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($row, 'tt_content'))));
     $line .= t3lib_BEfunc::getRecordTitle('tt_content', $row, TRUE);
     return $this->wrapRecordTitle($line, $row);
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:12,代码来源:class.t3lib_positionmap.php

示例5: getRecordHeader

 /**
  * Create record header (includes teh record icon, record title etc.)
  *
  * @param	array		Record row.
  * @return	string		HTML
  */
 function getRecordHeader($row)
 {
     $line = t3lib_iconWorks::getIconImage('tt_content', $row, $this->backPath, ' align="top" title="' . htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($row, 'tt_content')) . '"');
     $line .= t3lib_BEfunc::getRecordTitle('tt_content', $row, 1);
     return $this->wrapRecordTitle($line, $row);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:12,代码来源:class.tx_damcatedit_positionmap.php

示例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
  */
 function renderForeignRecordHeader($parentUid, $foreign_table, $rec, $config, $isVirtualRecord = false)
 {
     // Init:
     $objectId = $this->inlineNames['object'] . self::Structure_Separator . $foreign_table . self::Structure_Separator . $rec['uid'];
     $expandSingle = $config['appearance']['expandSingle'] ? 1 : 0;
     // 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)
     $onClick = "return inline.expandCollapseRecord('" . htmlspecialchars($objectId) . "', {$expandSingle}, '" . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "')";
     // Pre-Processing:
     $isOnSymmetricSide = t3lib_loadDBGroup::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));
         $null = null;
         // callUserFunction requires a third parameter, but we don't want to give $this as reference!
         t3lib_div::callUserFunction($GLOBALS['TCA'][$foreign_table]['ctrl']['label_userFunc'], $params, $null);
         $recTitle = $params['title'];
         // render the special alternative 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 = t3lib_BEfunc::getProcessedValueExtra($foreign_table, $titleCol, $rec[$titleCol], 0, 0, false);
             // Render title for group/db:
         } else {
             // $recTitle could be something like: "tx_table_123|...",
             $valueParts = t3lib_div::trimExplode('|', $rec[$titleCol]);
             $itemParts = t3lib_div::revExplode('_', $valueParts[0], 2);
             $recTemp = t3lib_befunc::getRecordWSOL($itemParts[0], $itemParts[1]);
             $recTitle = t3lib_BEfunc::getRecordTitle($itemParts[0], $recTemp, false);
         }
         $recTitle = t3lib_BEfunc::getRecordTitlePrep($recTitle);
         if (!strcmp(trim($recTitle), '')) {
             $recTitle = t3lib_BEfunc::getNoRecordTitle(true);
         }
         // render the standard
     } else {
         $recTitle = t3lib_BEfunc::getRecordTitle($foreign_table, $rec, true);
     }
     $altText = t3lib_BEfunc::getRecordIconAltText($rec, $foreign_table);
     $iconImg = t3lib_iconWorks::getSpriteIconForRecord($foreign_table, $rec, array('title' => htmlspecialchars($altText), 'id' => $objectId . '_icon"'));
     $label = '<span id="' . $objectId . '_label">' . $recTitle . '</span>';
     if (!$isVirtualRecord) {
         $iconImg = $this->wrapWithAnchor($iconImg, '#', array('onclick' => $onClick));
         $label = $this->wrapWithAnchor($label, '#', array('onclick' => $onClick, 'style' => 'display: block;'));
     }
     $ctrl = $this->renderForeignRecordHeaderControl($parentUid, $foreign_table, $rec, $config, $isVirtualRecord);
     // @TODO: Check the table wrapping and the CSS definitions
     $header = '<table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-right: ' . $this->inlineStyles['margin-right'] . 'px;"' . ($this->fObj->borderStyle[2] ? ' background="' . htmlspecialchars($this->backPath . $this->fObj->borderStyle[2]) . '"' : '') . ($this->fObj->borderStyle[3] ? ' class="' . htmlspecialchars($this->fObj->borderStyle[3]) . '"' : '') . '>' . '<tr class="class-main12"><td width="18" id="' . $objectId . '_iconcontainer">' . $iconImg . '</td><td align="left"><strong>' . $label . '</strong></td><td align="right">' . $ctrl . '</td></tr></table>';
     return $header;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:65,代码来源:class.t3lib_tceforms_inline.php

示例7: getTable

    /**
     * Creates the listing of records from a single table
     *
     * @param	string		Table name
     * @param	integer		Page id
     * @param	string		List of fields to show in the listing. Pseudo fields will be added including the record header.
     * @return	string		HTML table with the listing for the record.
     */
    function getTable($table, $rowlist)
    {
        global $TCA, $BACK_PATH, $LANG;
        // Loading all TCA details for this table:
        t3lib_div::loadTCA($table);
        // Init
        $addWhere = '';
        $titleCol = $TCA[$table]['ctrl']['label'];
        $thumbsCol = $TCA[$table]['ctrl']['thumbnail'];
        $l10nEnabled = $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField'] && !$TCA[$table]['ctrl']['transOrigPointerTable'];
        $selFieldList = $this->getSelFieldList($table, $rowlist);
        $dbCount = 0;
        if ($this->pointer->countTotal and $this->res) {
            $dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($this->res);
        }
        $shEl = $this->showElements;
        $out = '';
        if ($dbCount) {
            // half line is drawn
            $theData = array();
            if (!$this->table && !$rowlist) {
                $theData[$titleCol] = '<img src="clear.gif" width="' . ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] ? '230' : '350') . '" height="1">';
                if (in_array('_CONTROL_', $this->fieldArray)) {
                    $theData['_CONTROL_'] = '';
                }
            }
            #			$out.=$this->addelement('', $theData);
            // Header line is drawn
            $theData = array();
            #			$theData[$titleCol] = '<b>'.$GLOBALS['LANG']->sL($TCA[$table]['ctrl']['title'],1).'</b> ('.$this->resCount.')';
            $theUpIcon = '&nbsp;';
            // todo csh
            #			$theData[$titleCol].= t3lib_BEfunc::cshItem($table,'',$this->backPath,'',FALSE,'margin-bottom:0px; white-space: normal;');
            #			$out.=$this->addelement($theUpIcon, $theData, '', '', 'background-color:'.$this->headLineCol.'; border-bottom:1px solid #000');
            // Fixing a order table for sortby tables
            $this->currentTable = array();
            $currentIdList = array();
            $doSort = $TCA[$table]['ctrl']['sortby'] && !$this->sortField;
            $prevUid = 0;
            $prevPrevUid = 0;
            $accRows = array();
            // Accumulate rows here
            while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($this->res)) {
                $accRows[] = $row;
                $currentIdList[] = $row['uid'];
                if ($doSort) {
                    if ($prevUid) {
                        $this->currentTable['prev'][$row['uid']] = $prevPrevUid;
                        $this->currentTable['next'][$prevUid] = '-' . $row['uid'];
                        $this->currentTable['prevUid'][$row['uid']] = $prevUid;
                    }
                    $prevPrevUid = isset($this->currentTable['prev'][$row['uid']]) ? -$prevUid : $row['pid'];
                    $prevUid = $row['uid'];
                }
            }
            $GLOBALS['TYPO3_DB']->sql_free_result($this->res);
            // items
            $itemContentTRows = '';
            $this->duplicateStack = array();
            $this->eCounter = $this->pointer->firstItemNum;
            $cc = 0;
            $itemContentTRows .= $this->fwd_rwd_nav('rwd');
            foreach ($accRows as $row) {
                $this->alternateBgColors = false;
                $cc++;
                $row_bgColor = $this->alternateBgColors ? $cc % 2 ? ' class="item"' : ' class="item" bgColor="' . t3lib_div::modifyHTMLColor($GLOBALS['SOBE']->doc->bgColor4, +10, +10, +10) . '"' : ' class="item"';
                // Initialization
                $iconfile = t3lib_iconWorks::getIcon($table, $row);
                $alttext = t3lib_BEfunc::getRecordIconAltText($row, $table);
                $recTitle = t3lib_BEfunc::getRecordTitle($table, $row, 1);
                // The icon with link
                $theIcon = '<img src="' . $this->backPath . $iconfile . '" width="18" height="16" border="0" title="' . $alttext . '" />';
                $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon, $table, $row['uid']);
                $thumbImg = '';
                if ($this->thumbs) {
                    $thumbImg = '<div style="margin:2px 0 2px 0;">' . $this->getThumbNail(tx_dam::path_makeAbsolute($row['file_path']) . $row['file_name']) . '</div>';
                }
                // 	Preparing and getting the data-array
                $theData = array();
                reset($this->fieldArray);
                while (list(, $fCol) = each($this->fieldArray)) {
                    if ($fCol == $titleCol) {
                        $theData[$fCol] = $this->linkWrapItems($table, $row['uid'], $recTitle, $row) . $thumbImg;
                    } elseif ($fCol == 'pid') {
                        $theData[$fCol] = $row[$fCol];
                    } elseif ($fCol == '_CONTROL_') {
                        $theData[$fCol] = $this->makeControl($table, $row);
                    } else {
                        $theData[$fCol] = t3lib_BEfunc::getProcessedValueExtra($table, $fCol, $row[$fCol], 100);
                    }
                }
                $actionIcon = '';
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.tx_dam_db_list2.php

示例8: getPageInfo

 /**
  * Setting page icon with clickmenu + uid for docheader
  *
  * @param 	array	Current page
  * @return	string	Page info
  */
 protected function getPageInfo($pageRecord)
 {
     global $BE_USER;
     // Add icon with clickmenu, etc:
     if ($pageRecord['uid']) {
         // If there IS a real page
         $alttext = t3lib_BEfunc::getRecordIconAltText($pageRecord, 'pages');
         $iconImg = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageRecord, array('title' => $alttext));
         // Make Icon:
         $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
         $uid = $pageRecord['uid'];
         $title = t3lib_BEfunc::getRecordTitle('pages', $pageRecord);
     } else {
         // On root-level of page tree
         // Make Icon
         $iconImg = t3lib_iconWorks::getSpriteIcon('apps-pagetree-root', array('title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']));
         if ($BE_USER->user['admin']) {
             $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
         } else {
             $theIcon = $iconImg;
         }
         $uid = '0';
         $title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
     }
     // Setting icon with clickmenu + uid
     $pageInfo = $theIcon . '<strong>' . htmlspecialchars($title) . '&nbsp;[' . $uid . ']</strong>';
     return $pageInfo;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:34,代码来源:template.php

示例9: getIcon

 /**
  * Creates the icon image tag for record from table and wraps it in a link which will trigger the click menu.
  *
  * @param	string		Table name
  * @param	array		Record array
  * @param	string		Record title (NOT USED)
  * @return	string		HTML for the icon
  */
 function getIcon($table, $row, $noEdit)
 {
     // Initialization
     $alttext = t3lib_BEfunc::getRecordIconAltText($row, $table);
     $iconImg = t3lib_iconWorks::getIconImage($table, $row, $this->backPath, 'title="' . $alttext . '"');
     $this->counter++;
     if ($noEdit) {
         $disableList = '+info,copy';
     }
     // The icon with link
     $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, $table, $row['uid'], '', '', $disableList);
     return $theIcon;
 }
开发者ID:ghanshyamgohel,项目名称:tt_news,代码行数:21,代码来源:class.tx_ttnews_recordlist.php

示例10: printNewDBLevel

 /**
  * Make 2nd level clickmenu (only for DBmenus)
  *
  * @param	string		Table name
  * @param	integer		UID for the current record.
  * @return	string		HTML content
  */
 function printNewDBLevel($table, $uid)
 {
     global $TCA, $BE_USER;
     // Setting internal record to the table/uid :
     $this->rec = t3lib_BEfunc::getRecordWSOL($table, $uid);
     $menuItems = array();
     $root = 0;
     if ($table == 'pages' && !strcmp($uid, '0')) {
         // Rootlevel
         $root = 1;
     }
     // If record was found, check permissions and get menu items.
     if (is_array($this->rec) || $root) {
         $lCP = $BE_USER->calcPerms(t3lib_BEfunc::getRecord('pages', $table == 'pages' ? $this->rec['uid'] : $this->rec['pid']));
         // Edit:
         if (!$root && ($BE_USER->isPSet($lCP, $table, 'edit') || $BE_USER->isPSet($lCP, $table, 'editcontent'))) {
             $this->editOK = 1;
         }
         $menuItems = $this->processingByExtClassArray($menuItems, $table, $uid);
     }
     // Return the printed elements:
     if (!is_array($menuItems)) {
         $menuItems = array();
     }
     return $this->printItems($menuItems, $root ? t3lib_iconWorks::getSpriteIcon('apps-pagetree-root') . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) : t3lib_iconWorks::getSpriteIconForRecord($table, $this->rec, array('title' => htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($this->rec, $table)))) . t3lib_BEfunc::getRecordTitle($table, $this->rec, TRUE));
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:33,代码来源:alt_clickmenu.php

示例11: getContentTree_element

	/**
	 * Returns the content tree (based on the data structure) for a certain page or a flexible content element. In case of a page it will contain all the references
	 * to content elements (and some more information) and in case of a FCE, references to its sub-elements.
	 *
	 * @param	string		$table: Table which contains the (XML) data structure. Only records from table 'pages' or flexible content elements from 'tt_content' are handled
	 * @param	array		$row: Record of the root element where the tree starts (Possibly overlaid with workspace content)
	 * @param	array		$tt_content_elementRegister: Register of used tt_content elements, don't mess with it! (passed by reference since data is built up)
	 * @param	string		$prevRecList: comma separated list of uids, used internally for recursive calls. Don't mess with it!
	 * @param	integer		$depth: nexting depth
	 * @return	array		The content tree
	 * @access	protected
	 */
	function getContentTree_element($table, $row, &$tt_content_elementRegister, $prevRecList='', $depth=0)	{
		global $TCA, $LANG;

		$alttext = t3lib_BEfunc::getRecordIconAltText($row, $table);
		$tree = array();
		$tree['el'] = array(
			'table' => $table,
			'uid' => $row['uid'],
			'pid' => $row['pid'],
			'_ORIG_uid' => $row['_ORIG_uid'],
			'title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table, $row),50),
			'fullTitle' => t3lib_BEfunc::getRecordTitle($table, $row),
			'icon' => t3lib_iconWorks::getIcon($table,$row), // kept because it's not clear if this is used elsewhere
			'iconTag' => t3lib_iconWorks::getSpriteIconForRecord($table, $row, array('title' => $alttext)),
			'sys_language_uid' => $row['sys_language_uid'],
			'l18n_parent' => $row['l18n_parent'],
			'CType' => $row['CType'],
			'TO' => $row['tx_templavoila_to'],
		);

		if ($this->includePreviewData)	{
			$tree['previewData'] = array(
				'fullRow' => $row
			);
		}

			// If element is a Flexible Content Element (or a page) then look at the content inside:
		if ($table == 'pages' || $table == $this->rootTable || ($table=='tt_content' && $row['CType']=='templavoila_pi1'))	{

			t3lib_div::loadTCA($table);
			$rawDataStructureArr = t3lib_BEfunc::getFlexFormDS($TCA[$table]['columns']['tx_templavoila_flex']['config'], $row, $table);
			$expandedDataStructureArr = $this->ds_getExpandedDataStructure($table, $row);

			switch ($table) {
				case 'pages' :
					$currentTemplateObject = $this->getContentTree_fetchPageTemplateObject($row);
					break;
				case 'tt_content':
					$currentTemplateObject = t3lib_beFunc::getRecordWSOL('tx_templavoila_tmplobj', $row['tx_templavoila_to']);
					break;
				default:
					$currentTemplateObject = FALSE;
			}
			if (is_array ($currentTemplateObject)) $templateMappingArr = unserialize($currentTemplateObject['templatemapping']);
			$tree['ds_is_found'] = is_array($rawDataStructureArr);
			$tree['ds_meta'] = $rawDataStructureArr['meta'];
			$flexformContentArr = t3lib_div::xml2array($row['tx_templavoila_flex']);
			if (!is_array($flexformContentArr))	$flexformContentArr = array();

				// Respect the currently selected language, for both concepts - with langChildren enabled and disabled:
			$langChildren = intval($tree['ds_meta']['langChildren']);
			$langDisable = intval($tree['ds_meta']['langDisable']);

			$lKeys = $langDisable ? array('lDEF') : ($langChildren ? array('lDEF') : $this->allSystemWebsiteLanguages['all_lKeys']);
			$vKeys = $langDisable ? array('vDEF') : ($langChildren ? $this->allSystemWebsiteLanguages['all_vKeys'] : array('vDEF'));

				// Traverse each sheet in the FlexForm Structure:
			foreach($expandedDataStructureArr as $sheetKey => $sheetData)	{

					// Add some sheet meta information:
				$tree['sub'][$sheetKey] = array();
				$tree['contentFields'][$sheetKey] = array();
				$tree['meta'][$sheetKey] = array(
					'title' => (is_array($sheetData) && $sheetData['ROOT']['TCEforms']['sheetTitle'] ? $LANG->sL($sheetData['ROOT']['TCEforms']['sheetTitle']) : ''),
					'description' => (is_array($sheetData) && $sheetData['ROOT']['TCEforms']['sheetDescription'] ? $LANG->sL($sheetData['ROOT']['TCEforms']['sheetDescription']) : ''),
					'short' => (is_array($sheetData) && $sheetData['ROOT']['TCEforms']['sheetShortDescr'] ? $LANG->sL($sheetData['ROOT']['TCEforms']['sheetShortDescr']) : ''),
				);

					// Traverse the sheet's elements:
				if (is_array($sheetData) && is_array($sheetData['ROOT']['el']))	{
					foreach($sheetData['ROOT']['el'] as $fieldKey => $fieldData) {

							// Compile preview data:
						if ($this->includePreviewData)	{
							$tree['previewData']['sheets'][$sheetKey][$fieldKey] = array(
								'TCEforms' => $fieldData['TCEforms'],
								'tx_templavoila' => $fieldData['tx_templavoila'],
								'type' => $fieldData['type'],
								'section' => $fieldData['section'],
								'data' => array(),
								'subElements' => array(),
								'isMapped' => !empty($templateMappingArr['MappingInfo']['ROOT']['el'][$fieldKey]['MAP_EL'])
							);
							foreach($lKeys as $lKey)	{
								foreach($vKeys as $vKey)	{
									if (is_array($flexformContentArr['data'])) {
										$tree['previewData']['sheets'][$sheetKey][$fieldKey]['data'][$lKey][$vKey] = $flexformContentArr['data'][$sheetKey][$lKey][$fieldKey][$vKey];
									}
//.........这里部分代码省略.........
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:101,代码来源:class.tx_templavoila_api.php

示例12: getRecordDetails

 /**
  * This method gets the title and the icon for a given record of a given table
  * It returns these as a HTML string
  *
  * @param	string		$table: name of the table
  * @param	integer		$uid: primary key of the record
  * @return	string		HTML to display
  */
 function getRecordDetails($table, $uid)
 {
     global $BACK_PATH;
     if (empty($table) || empty($uid)) {
         return '';
     } else {
         $row = array();
         if (isset($this->records[$table][$uid])) {
             $row = $this->records[$table][$uid];
         } else {
             $row = t3lib_BEfunc::getRecord($table, $uid);
         }
         $iconAltText = t3lib_BEfunc::getRecordIconAltText($row, $table);
         $elementTitle = t3lib_BEfunc::getRecordTitle($table, $row, 1);
         $elementIcon = t3lib_iconworks::getIconImage($table, $row, $BACK_PATH, 'class="c-recicon" title="' . $iconAltText . '"');
         return $elementIcon . $elementTitle;
     }
 }
开发者ID:samuweiss,项目名称:TYPO3-Site,代码行数:26,代码来源:index.php

示例13: getPageLink

 /**
  * Returns a linked icon with title from a page
  *
  * @param integer $uid ID of the page
  * @return string HTML for icon, title and link
  */
 protected function getPageLink($uid)
 {
     $string = '';
     if (!empty($uid)) {
         $page = t3lib_BEfunc::getRecord('pages', $uid);
         // If the page doesn't exist, the result is null, but we need rather an empty array
         if ($page === NULL) {
             $page = array();
         }
         $pageTitle = t3lib_BEfunc::getRecordTitle('pages', $page, 1);
         $iconAltText = t3lib_BEfunc::getRecordIconAltText($page, 'pages');
         // Create icon for record
         $elementIcon = t3lib_iconWorks::getSpriteIconForRecord('pages', $page, array('title' => $iconAltText));
         // Return item with link to Web > List
         $editOnClick = "top.goToModule('web_list', '', '&id=" . $uid . "')";
         $string = '<a href="#" onclick="' . htmlspecialchars($editOnClick) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:external_import/Resources/Private/Language/locallang.xml:jump_to_page') . '">' . $elementIcon . $pageTitle . '</a>';
     }
     return $string;
 }
开发者ID:portrino,项目名称:ExternalImport,代码行数:25,代码来源:Server.php

示例14: main

    /**
     * Creating the module output.
     *
     * @return	void
     * @todo	provide position mapping if no position is given already. Like the columns selector but for our cascading element style ...
     */
    function main()
    {
        global $LANG, $BACK_PATH, $BE_USER;
        if ($this->id && $this->access) {
            // Creating content
            $this->content = '';
            $this->content .= $this->doc->startPage($LANG->getLL('newContentElement'));
            $this->content .= $this->doc->header($LANG->getLL('newContentElement'));
            $this->content .= $this->doc->spacer(5);
            $elRow = t3lib_BEfunc::getRecordWSOL('pages', $this->id);
            $header = t3lib_iconWorks::getIconImage('pages', $elRow, $BACK_PATH, ' title="' . htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($elRow, 'pages')) . '" align="top"');
            $header .= t3lib_BEfunc::getRecordTitle('pages', $elRow, 1);
            $this->content .= $this->doc->section('', $header, 0, 1);
            $this->content .= $this->doc->spacer(10);
            // Wizard
            $wizardCode = '';
            $tableRows = array();
            $wizardItems = $this->getWizardItems();
            // Traverse items for the wizard.
            // An item is either a header or an item rendered with a title/description and icon:
            $counter = 0;
            // #
            // ### Mansoor Ahmad @ Gosign media. GmbH - Set it for ...
            // #
            $ignoreList = 'list,templavoila_pi1';
            foreach ($wizardItems as $key => $wizardItem) {
                if ($wizardItem['header']) {
                    if ($counter > 0) {
                        $tableRows[] = '
						<tr>
							<td colspan="3"><br /></td>
						</tr>';
                    }
                    $tableRows[] = '
						<tr class="bgColor5">
							<td colspan="3"><strong>' . htmlspecialchars($wizardItem['header']) . '</strong></td>
						</tr>';
                } else {
                    $tableLinks = array();
                    // href URI for icon/title:
                    $newRecordLink = 'index.php?' . $this->linkParams() . '&createNewRecord=' . rawurlencode($this->parentRecord) . $wizardItem['params'];
                    // Icon:
                    $iInfo = @getimagesize($wizardItem['icon']);
                    $tableLinks[] = '<a href="' . $newRecordLink . '"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, $wizardItem['icon'], '') . ' alt="" /></a>';
                    // Title + description:
                    $tableLinks[] = '<a href="' . $newRecordLink . '"><strong>' . htmlspecialchars($wizardItem['title']) . '</strong><br />' . nl2br(htmlspecialchars(trim($wizardItem['description']))) . '</a>';
                    // Finally, put it together in a table row:
                    // #
                    // ### Mansoor Ahmad @ Gosign media. GmbH - start
                    // #
                    //print_r($wizardItems);
                    $actionForm = 'db_new_content_el.php?' . $this->linkParams() . '&parentRecord=' . t3lib_div::GPvar('parentRecord');
                    if (t3lib_div::GPvar('count') == $counter && t3lib_div::GPvar('go_backend_layout_edit') == 1) {
                        $tableRows[] = '
						<tr>
							<td valign="top" colspan="3">' . $this->getEditTable($wizardItem, $actionForm) . '
								<a name="' . $wizardItem['tt_content_defValues']['CType'] . '" />
							</td>
						</tr>';
                    } else {
                        $tableRows[] = '
							<tr>
								<td valign="top"><a name="' . $wizardItem['tt_content_defValues']['CType'] . '" />' . implode('</td>
								<td valign="top">', $tableLinks) . '</td>
								<td valign="top">' . ($BE_USER->isAdmin() && !in_array($wizardItem['tt_content_defValues']['CType'], explode(',', $ignoreList)) ? '<a href="db_new_content_el.php?' . $this->linkParams() . '&parentRecord=' . t3lib_div::GPvar('parentRecord') . '&go_backend_layout_edit=1&count=' . $counter . '#' . $wizardItem['tt_content_defValues']['CType'] . '"><img src="../../../../typo3/sysext/t3skin/icons/gfx/edit2.gif" /></a>' : '') . '</td>
							</tr>';
                        $editData = array('CType' => t3lib_div::GPvar('CType'), 'title' => t3lib_div::GPvar('title'), 'desc' => t3lib_div::GPvar('desc'));
                        if ($editData['CType'] == $wizardItem['tt_content_defValues']['CType']) {
                            $this->saveEditTableData($editData, $wizardItem);
                        } elseif (t3lib_div::GPvar('submit')) {
                            header('location:' . $actionForm . '#' . t3lib_div::GPvar('CType'));
                        }
                    }
                    // #
                    // ### Mansoor Ahmad @ Gosign media. GmbH - end
                    // #
                    $counter++;
                }
            }
            // Add the wizard table to the content:
            $wizardCode .= $LANG->getLL('sel1', 1) . '<br /><br />

			<!--
				Content Element wizard table:
			-->
				<table border="0" cellpadding="1" cellspacing="2" id="typo3-ceWizardTable" style="float:left;">
					' . implode('', $tableRows) . '
				</table>
				';
            $this->content .= $this->doc->section($LANG->getLL('1_selectType'), $wizardCode, 0, 1);
        } else {
            // In case of no access:
            $this->content = '';
            $this->content .= $this->doc->startPage($LANG->getLL('newContentElement'));
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:ux_db_new_content_el.php

示例15: getIcon

 /**
  * Creates the icon image tag for record from table and wraps it in a link which will trigger the click menu.
  *
  * @param	string		Table name
  * @param	array		Record array
  * @param	string		Record title (NOT USED)
  * @return	string		HTML for the icon
  */
 function getIcon($table, $row)
 {
     // Initialization
     $alttext = t3lib_BEfunc::getRecordIconAltText($row, $table);
     $iconImg = t3lib_iconWorks::getSpriteIconForRecord($table, $row, array('title' => $alttext));
     $this->counter++;
     // The icon with link
     $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, $table, $row['uid']);
     return $theIcon;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:18,代码来源:class.tx_cms_layout.php


注:本文中的t3lib_BEfunc::getRecordIconAltText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。