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


PHP t3lib_BEfunc::getLabelFromItemlist方法代码示例

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


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

示例1: getPreviewData

 /**
  * (non-PHPdoc)
  * @see classes/preview/tx_templavoila_preview_type_text#getPreviewData($row)
  */
 protected function getPreviewData($row)
 {
     $extraInfo = $this->getExtraInfo($row);
     $this->parentObj = $ref;
     $info = htmlspecialchars($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type'])));
     $info .= $extraInfo ? ' – ' . $extraInfo : '';
     return $info;
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:12,代码来源:class.tx_templavoila_preview_type_list.php

示例2: getPreviewData

 /**
  * (non-PHPdoc)
  * @see classes/preview/tx_templavoila_preview_type_text#getPreviewData($row)
  */
 protected function getPreviewData($row)
 {
     return $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', $this->previewField, $row[$this->previewField]));
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:8,代码来源:class.tx_templavoila_preview_type_menu.php

示例3: ext_printOverview

 /**
  * Creates the overview information based on which analysis topics were selected.
  *
  * @param	array		Array of analysis topics
  * @param	array		Array of the selected analysis topics (from session variable somewhere)
  * @param	boolean		If set, the full trees of pages/folders are printed.
  * @return	array		Array with accumulated HTML content.
  */
 function ext_printOverview($uInfo, $compareFlags, $printTrees = 0)
 {
     // Prepare for filemount and db-mount
     if ($printTrees) {
         // ... this is if we see the detailed view for a user:
         // Page tree object:
         $pagetree = t3lib_div::makeInstance(!$this->isAdmin() ? 'printAllPageTree_perms' : 'printAllPageTree', $this, $this->returnWebmounts());
         // Here, only readable webmounts are returned (1=1)
         $pagetree->addField('perms_user', 1);
         $pagetree->addField('perms_group', 1);
         $pagetree->addField('perms_everybody', 1);
         $pagetree->addField('perms_userid', 1);
         $pagetree->addField('perms_groupid', 1);
         $pagetree->addField('editlock', 1);
         // Folder tree object:
         $foldertree = t3lib_div::makeInstance('printAllFolderTree', $this, $this->returnFilemounts());
     } else {
         // Page tree object:
         $pagetree = t3lib_div::makeInstance('localPageTree', $this, $this->returnWebmounts('1=1'));
         // Here, ALL webmounts are returned (1=1)
         // Folder tree object:
         $foldertree = t3lib_div::makeInstance('localFolderTree', $this, $this->returnFilemounts());
     }
     // Names for modules:
     $modNames = array('web' => 'Web', 'web_layout' => 'Page', 'web_modules' => 'Modules', 'web_info' => 'Info', 'web_perms' => 'Access', 'web_func' => 'Func', 'web_list' => 'List', 'web_ts' => 'Template', 'file' => 'File', 'file_list' => 'List', 'file_images' => 'Images', 'doc' => 'Doc.', 'help' => 'Help', 'help_about' => 'About', 'help_quick' => 'User manual', 'help_welcome' => 'Welcome', 'user' => 'User', 'user_setup' => 'Setup', 'user_task' => 'Task center');
     // Traverse the enabled analysis topics:
     $out = array();
     foreach ($uInfo as $k => $v) {
         if ($compareFlags[$k]) {
             switch ($k) {
                 case 'filemounts':
                     $out[$k] = $foldertree->getBrowsableTree();
                     break;
                 case 'webmounts':
                     // Print webmounts:
                     $pagetree->addSelfId = 1;
                     $out[$k] = $this->ext_non_readAccessPages();
                     // Add HTML for non-readable webmounts (only shown when viewing details of a user - in overview/comparison ALL mounts are shown)
                     $out[$k] .= $pagetree->getBrowsableTree();
                     // Add HTML for readable webmounts.
                     $this->ext_pageIdsFromMounts = implode(',', array_unique($pagetree->ids));
                     // List of mounted page ids
                     break;
                 case 'tempPath':
                     $out[$k] = $GLOBALS['SOBE']->localPath($v);
                     break;
                 case 'pagetypes_select':
                     $pageTypes = explode(',', $v);
                     foreach ($pageTypes as &$vv) {
                         $vv = $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('pages', 'doktype', $vv));
                     }
                     $out[$k] = implode('<br />', $pageTypes);
                     break;
                 case 'tables_select':
                 case 'tables_modify':
                     $tables = explode(',', $v);
                     foreach ($tables as &$vv) {
                         if ($vv) {
                             $vv = '<span class="nobr">' . t3lib_iconWorks::getSpriteIconForRecord($vv, array()) . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$vv]['ctrl']['title']) . '</span>';
                         }
                     }
                     $out[$k] = implode('<br />', $tables);
                     break;
                 case 'non_exclude_fields':
                     $nef = explode(',', $v);
                     $table = '';
                     $pout = array();
                     foreach ($nef as $vv) {
                         if ($vv) {
                             list($thisTable, $field) = explode(':', $vv);
                             if ($thisTable != $table) {
                                 $table = $thisTable;
                                 t3lib_div::loadTCA($table);
                                 $pout[] = '<span class="nobr">' . t3lib_iconWorks::getSpriteIconForRecord($table, array()) . $GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title']) . '</span>';
                             }
                             if ($GLOBALS['TCA'][$table]['columns'][$field]) {
                                 $pout[] = '<span class="nobr"> - ' . rtrim($GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label']), ':') . '</span>';
                             }
                         }
                     }
                     $out[$k] = implode('<br />', $pout);
                     break;
                 case 'groupList':
                 case 'firstMainGroup':
                     $uGroups = explode(',', $v);
                     $table = '';
                     $pout = array();
                     foreach ($uGroups as $vv) {
                         if ($vv) {
                             $uGRow = t3lib_BEfunc::getRecord('be_groups', $vv);
                             $pout[] = '<tr><td nowrap="nowrap">' . t3lib_iconWorks::getSpriteIconForRecord('be_groups', $uGRow) . '&nbsp;' . htmlspecialchars($uGRow['title']) . '&nbsp;&nbsp;</td><td width=1% nowrap="nowrap">' . $GLOBALS['SOBE']->elementLinks('be_groups', $uGRow) . '</td></tr>';
                         }
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php

示例4: tt_content_drawItem

    /**
     * Draws the preview content for a content element
     *
     * @param	string		Content element
     * @param	boolean		Set if the RTE link can be created.
     * @return	string		HTML
     */
    function tt_content_drawItem($row, $isRTE = FALSE)
    {
        global $TCA;
        $out = '';
        $outHeader = '';
        // Make header:
        if ($row['header']) {
            $infoArr = array();
            $this->getProcessedValue('tt_content', 'header_position,header_layout,header_link', $row, $infoArr);
            // If header layout is set to 'hidden', display an accordant note:
            if ($row['header_layout'] == 100) {
                $hiddenHeaderNote = ' <em>[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.hidden', true) . ']</em>';
            }
            $outHeader = ($row['date'] ? htmlspecialchars($this->itemLabels['date'] . ' ' . t3lib_BEfunc::date($row['date'])) . '<br />' : '') . '<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 = t3lib_div::getUserObj($hookClass);
                if (!$hookObject instanceof tx_cms_layout_tt_content_drawItemHook) {
                    throw new UnexpectedValueException('$hookObject must implement interface tx_cms_layout_tt_content_drawItemHook', 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']) {
                            $this->getProcessedValue('tt_content', 'text_align,text_face,text_size,text_color,text_properties', $row, $infoArr);
                            $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->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                    }
                    break;
                case 'multimedia':
                    if ($row['multimedia']) {
                        $out .= $this->renderText($row['multimedia']) . '<br />';
                        $out .= $this->renderText($row['parameters']) . '<br />';
                    }
                    break;
                case 'splash':
                    if ($row['bodytext']) {
                        $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                    }
                    if ($row['image']) {
                        $out .= $this->thumbCode($row, 'tt_content', 'image') . '<br />';
                    }
                    break;
                case 'menu':
                    if ($row['pages']) {
                        $out .= $this->linkEditContent($row['pages'], $row) . '<br />';
                    }
                    break;
                case 'shortcut':
                    if ($row['records']) {
                        $out .= $this->linkEditContent($row['shortcut'], $row) . '<br />';
                    }
                    break;
                case 'list':
                    $out .= $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content', 'list_type'), 1) . ' ' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']), 1) . '<br />';
//.........这里部分代码省略.........
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:101,代码来源:class.tx_cms_layout.php

示例5: printRecordMap

    /**
     * Creates the table with the content columns
     *
     * @param	array		Array with arrays of lines for each column
     * @param	array		Column position array
     * @return	string		HTML
     */
    function printRecordMap($lines, $colPosArray)
    {
        $row1 = '';
        $row2 = '';
        $count = t3lib_div::intInRange(count($colPosArray), 1);
        // Traverse the columns here:
        foreach ($colPosArray as $kk => $vv) {
            $row1 .= '<td align="center" width="' . round(100 / $count) . '%"><span class="uppercase"><strong>' . $this->wrapColumnHeader($GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'colPos', $vv), 1), $vv) . '</strong></span></td>';
            $row2 .= '<td valign="top" nowrap="nowrap">' . implode('<br />', $lines[$kk]) . '</td>';
        }
        $table = '

		<!--
			Map of records in columns:
		-->
		<table border="0" cellpadding="0" cellspacing="1" id="typo3-ttContentList">
			<tr class="bgColor5">' . $row1 . '</tr>
			<tr>' . $row2 . '</tr>
		</table>

		';
        return $this->JSimgFunc('2') . $table;
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:30,代码来源:class.t3lib_positionmap.php

示例6: render_previewContent

 /**
  *
  * @param array $row
  * @param string $table
  * @param string $output
  * @param boolean $alreadyRendered
  * @param object $ref
  * @return string
  */
 public function render_previewContent($row, $table, $output, $alreadyRendered, &$ref)
 {
     return '<strong>' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'CType', $row['CType'])) . '</strong>';
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:13,代码来源:class.tx_templavoila_preview_default.php

示例7: render_previewContent

 /**
  * Returns an HTMLized preview of a certain content element. If you'd like to register a new content type, you can easily use the hook
  * provided at the beginning of the function.
  *
  * @param	array		$row: The row of tt_content containing the content element record.
  * @return	string		HTML preview content
  * @access protected
  * @see		getContentTree(), render_localizationInfoTable()
  */
 function render_previewContent($row)
 {
     global $TYPO3_CONF_VARS, $LANG, $LANGPLUGIN, $TCA;
     $hookObjectsArr = $this->hooks_prepareObjectsArray('renderPreviewContentClass');
     $alreadyRendered = FALSE;
     $output = '';
     // ELIO@GOSIGN 13/08/09: For LFEditor Link
     $langFile = '';
     // Hook: renderPreviewContent_preProcess. Set 'alreadyRendered' to true if you provided a preview content for the current cType !
     reset($hookObjectsArr);
     while (list(, $hookObj) = each($hookObjectsArr)) {
         if (method_exists($hookObj, 'renderPreviewContent_preProcess')) {
             $output .= $hookObj->renderPreviewContent_preProcess($row, 'tt_content', $alreadyRendered, $this);
         }
     }
     if (!$alreadyRendered) {
         // Preview content for non-flexible content elements:
         switch ($row['CType']) {
             case 'table':
                 //	Table
                 $output = '<strong>' . $LANG->getLL($row['CType'] . '.field.text', 1) . '</strong>: <br />' . nl2br($row['bodytext']) . '<br />' . $this->getPiName($LANGPLUGIN->getLL('common_6_title'));
                 break;
             case 'splash':
                 //	Textbox
                 $thumbnail = '<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'image'), 1) . '</strong><br />';
                 $thumbnail .= t3lib_BEfunc::thumbCode($row, 'tt_content', 'image', $this->doc->backPath);
                 $text = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'bodytext'), 1) . '</strong> ' . htmlspecialchars(t3lib_div::fixed_lgd_cs(trim(strip_tags($row['bodytext'])), 2000)), 'tt_content', $row['uid']);
                 $output = '<table><tr><td valign="top">' . $text . '</td><td valign="top">' . $thumbnail . '</td></tr></table>' . '<br />';
                 break;
             case 'list':
                 //	Insert Plugin
                 switch ($row['list_type']) {
                     case '9':
                         $html = $this->getTTNews($row);
                         break;
                     case 'rwe_feuseradmin_pi1':
                         $html = '<strong>' . $LANG->getLL($row['list_type'] . '.field.hinweis', 1) . '</strong>: <br />' . $LANG->getLL($row['list_type'] . '.field.hinweis.content', 1) . '<br />' . $this->getPiName($LANG->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type'])));
                         break;
                     case 'th_mailformplus_pi1':
                         $html = '<strong>' . $LANG->getLL($row['list_type'] . '.field.hinweis', 1) . '</strong>: <br />' . $LANG->getLL($row['list_type'] . '.field.hinweis.content', 1) . '<br />' . '<br /><br /><strong style="margin:2px;padding:2px;border:1px solid #bfbfbf; background-color:#FFFFFF;">' . $LANG->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type'])) . '</strong><br /><br />';
                         // ELIO@GOSIGN 13/08/09 START
                         // LFE-Link: we have to set the langfile like this for this plugin
                         $typoscript = $this->loadTS($row['pid']);
                         $langFile = $typoscript->setup['plugin.']['tx_thmailformplus_pi1.']['langFile'];
                         // ELIO@GOSIGN 13/08/09 END
                         break;
                 }
                 if ($html) {
                     $output = $this->link_edit($html, 'tt_content', $row['uid']) . '<br />';
                 } else {
                     $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'list_type')) . '</strong> ' . htmlspecialchars($LANG->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']))) . ' &ndash; ' . htmlspecialchars($extraInfo ? $extraInfo : $row['list_type']), 'tt_content', $row['uid']) . '<br />';
                 }
                 break;
             case 'div':
                 //	Divider
             //	Divider
             case 'templavoila_pi1':
                 //	Flexible Content Element: Rendered directly in getContentTree*()
                 switch ($row['tx_templavoila_to']) {
                     default:
                         // Render the Rest Flexform Elements
                         $html = $this->renderFlex($row);
                         break;
                 }
                 $output = $html;
                 break;
             default:
                 // Render the Rest CType Elements
                 $output = $this->renderPi($row);
         }
     }
     // ELIO@GOSIGN 13/08/09 START
     // Add LFEditor link
     if ($row['CType'] == 'list' && !empty($row['list_type'])) {
         //  if this is a plugin
         $output .= $this->addLFEditLink($row['list_type'], $langFile);
     } elseif ($row['CType'] != 'list') {
         // if this is a normal CType
         $output .= $this->addLFEditLink($row['CType'], $langFile);
     }
     // ELIO@GOSIGN 13/08/09 END
     return $output;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:92,代码来源:class.ux_tx_templavoila_module1.php

示例8: tt_content_drawItem


//.........这里部分代码省略.........
                        foreach ($filesArray['rows'] as $rowDAM) {
                            $caption = tx_dam_guiFunc::meta_compileInfoData($rowDAM, '_caption:truncate:100', 'value-string');
                            #$imgAttributes['title'] = tx_dam_guiFunc::meta_compileHoverText($rowDAM);
                            #$thumb = tx_dam_image::previewImgTag($rowDAM, '', $imgAttributes);
                            $thumb = tx_dam_guiFunc::thumbnail($rowDAM);
                            $thumb = '<div style="float:left;width:56px; overflow:auto; margin: 2px 5px 2px 0; padding: 5px; background-color:#fff; border:solid 1px #ccc;">' . $thumb . '</div>';
                            $thumb = '<div>' . $thumb . $caption . '</div><div style="clear:both"></div>';
                            $out .= $thumb;
                        }
                    }
                    #############
                }
                break;
            case 'bullets':
                if ($row['bodytext']) {
                    $this->getProcessedValue('tt_content', 'layout,text_align,text_face,text_size,text_color,text_properties', $row, $infoArr);
                    $out .= $this->infoGif($infoArr) . $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                }
                break;
            case 'table':
                if ($row['bodytext']) {
                    $this->getProcessedValue('tt_content', 'table_bgColor,table_border,table_cellspacing,cols,layout,text_align,text_face,text_size,text_color,text_properties', $row, $infoArr);
                    $out .= $this->infoGif($infoArr) . $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                }
                break;
            case 'uploads':
                if ($row['media']) {
                    $this->getProcessedValue('tt_content', 'media,select_key,layout,filelink_size,table_bgColor,table_border,table_cellspacing', $row, $infoArr);
                    $out .= $this->infoGif($infoArr) . $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                }
                break;
            case 'multimedia':
                if ($row['multimedia']) {
                    $out .= $this->renderText($row['multimedia']) . '<br />';
                    $out .= $this->renderText($row['parameters']) . '<br />';
                }
                break;
            case 'mailform':
                if ($row['bodytext']) {
                    $this->getProcessedValue('tt_content', 'pages,subheader', $row, $infoArr);
                    $out .= $this->infoGif($infoArr) . $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                }
                break;
            case 'splash':
                if ($row['bodytext']) {
                    $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                }
                if ($row['image']) {
                    $infoArr = array();
                    $this->getProcessedValue('tt_content', 'imagewidth', $row, $infoArr);
                    $out .= $this->infoGif($infoArr) . $this->thumbCode($row, 'tt_content', 'image') . '<br />';
                }
                break;
            case 'menu':
                if ($row['pages']) {
                    $this->getProcessedValue('tt_content', 'menu_type', $row, $infoArr);
                    $out .= $this->infoGif($infoArr) . $this->linkEditContent($row['pages'], $row) . '<br />';
                }
                break;
            case 'shortcut':
                if ($row['records']) {
                    $this->getProcessedValue('tt_content', 'layout', $row, $infoArr);
                    $out .= $this->infoGif($infoArr) . $this->linkEditContent($row['shortcut'], $row) . '<br />';
                }
                break;
            case 'list':
                $this->getProcessedValue('tt_content', 'layout', $row, $infoArr);
                $out .= $this->infoGif($infoArr) . $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content', 'list_type'), 1) . ' ' . $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']), 1) . '<br />';
                $out .= $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content', 'select_key'), 1) . ' ' . $row['select_key'] . '<br />';
                $infoArr = array();
                $this->getProcessedValue('tt_content', 'recursive', $row, $infoArr);
                $out .= $this->infoGif($infoArr) . $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'pages', $row['pages']), 1) . '<br />';
                break;
            case 'script':
                $out .= $GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content', 'select_key'), 1) . ' ' . $row['select_key'] . '<br />';
                $out .= '<br />' . $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                $out .= '<br />' . $this->linkEditContent($this->renderText($row['imagecaption']), $row) . '<br />';
                break;
            default:
                if ($row['bodytext']) {
                    $out .= $this->linkEditContent($this->renderText($row['bodytext']), $row) . '<br />';
                }
                break;
        }
        // Wrap span-tags:
        $out = '
			<span class="exampleContent">' . $out . '</span>';
        // Add header:
        $out = $outHeader . $out;
        // Add RTE button:
        if ($isRTE) {
            $out .= $this->linkRTEbutton($row);
        }
        // Return values:
        if ($this->isDisabled('tt_content', $row)) {
            return $GLOBALS['TBE_TEMPLATE']->dfw($out);
        } else {
            return $out;
        }
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.ux_tx_cms_layout.php

示例9: renderQuickEdit

    /**
     * Rendering the quick-edit view.
     *
     * @return	void
     */
    function renderQuickEdit()
    {
        global $LANG, $BE_USER, $BACK_PATH;
        // Alternative template
        $this->doc->setModuleTemplate('templates/db_layout_quickedit.html');
        // Alternative form tag; Quick Edit submits its content to tce_db.php.
        $this->doc->form = '<form action="' . htmlspecialchars($BACK_PATH . 'tce_db.php?&prErr=1&uPT=1') . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">';
        // Setting up the context sensitive menu:
        $this->doc->getContextMenuCode();
        // Set the edit_record value for internal use in this function:
        $edit_record = $this->edit_record;
        // If a command to edit all records in a column is issue, then select all those elements, and redirect to alt_doc.php:
        if (substr($edit_record, 0, 9) == '_EDIT_COL') {
            $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . intval($this->id) . ' AND colPos=' . intval(substr($edit_record, 10)) . ' AND sys_language_uid=' . intval($this->current_sys_language) . ($this->MOD_SETTINGS['tt_content_showHidden'] ? '' : t3lib_BEfunc::BEenableFields('tt_content')) . t3lib_BEfunc::deleteClause('tt_content') . t3lib_BEfunc::versioningPlaceholderClause('tt_content'), '', 'sorting');
            $idListA = array();
            while ($cRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                $idListA[] = $cRow['uid'];
            }
            $url = $BACK_PATH . 'alt_doc.php?edit[tt_content][' . implode(',', $idListA) . ']=edit&returnUrl=' . rawurlencode($this->local_linkThisScript(array('edit_record' => '')));
            t3lib_utility_Http::redirect($url);
        }
        // If the former record edited was the creation of a NEW record, this will look up the created records uid:
        if ($this->new_unique_uid) {
            $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_log', 'userid=' . intval($BE_USER->user['uid']) . ' AND NEWid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->new_unique_uid, 'sys_log'));
            $sys_log_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
            if (is_array($sys_log_row)) {
                $edit_record = $sys_log_row['tablename'] . ':' . $sys_log_row['recuid'];
            }
        }
        // Creating the selector box, allowing the user to select which element to edit:
        $opt = array();
        $is_selected = 0;
        $languageOverlayRecord = '';
        if ($this->current_sys_language) {
            list($languageOverlayRecord) = t3lib_BEfunc::getRecordsByField('pages_language_overlay', 'pid', $this->id, 'AND sys_language_uid=' . intval($this->current_sys_language));
        }
        if (is_array($languageOverlayRecord)) {
            $inValue = 'pages_language_overlay:' . $languageOverlayRecord['uid'];
            $is_selected += intval($edit_record == $inValue);
            $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>[ ' . $LANG->getLL('editLanguageHeader', 1) . ' ]</option>';
        } else {
            $inValue = 'pages:' . $this->id;
            $is_selected += intval($edit_record == $inValue);
            $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>[ ' . $LANG->getLL('editPageProperties', 1) . ' ]</option>';
        }
        // Selecting all content elements from this language and allowed colPos:
        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . intval($this->id) . ' AND sys_language_uid=' . intval($this->current_sys_language) . ' AND colPos IN (' . $this->colPosList . ')' . ($this->MOD_SETTINGS['tt_content_showHidden'] ? '' : t3lib_BEfunc::BEenableFields('tt_content')) . t3lib_Befunc::deleteClause('tt_content') . t3lib_BEfunc::versioningPlaceholderClause('tt_content'), '', 'colPos,sorting');
        $colPos = '';
        $first = 1;
        $prev = $this->id;
        // Page is the pid if no record to put this after.
        while ($cRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
            t3lib_BEfunc::workspaceOL('tt_content', $cRow);
            if (is_array($cRow)) {
                if ($first) {
                    if (!$edit_record) {
                        $edit_record = 'tt_content:' . $cRow['uid'];
                    }
                    $first = 0;
                }
                if (strcmp($cRow['colPos'], $colPos)) {
                    $colPos = $cRow['colPos'];
                    $opt[] = '<option value=""></option>';
                    $opt[] = '<option value="_EDIT_COL:' . $colPos . '">__' . $LANG->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'colPos', $colPos), 1) . ':__</option>';
                }
                $inValue = 'tt_content:' . $cRow['uid'];
                $is_selected += intval($edit_record == $inValue);
                $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($cRow['header'] ? $cRow['header'] : '[' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.no_title') . '] ' . strip_tags($cRow['bodytext']), $BE_USER->uc['titleLen'])) . '</option>';
                $prev = -$cRow['uid'];
            }
        }
        // If edit_record is not set (meaning, no content elements was found for this language) we simply set it to create a new element:
        if (!$edit_record) {
            $edit_record = 'tt_content:new/' . $prev . '/' . $colPos;
            $inValue = 'tt_content:new/' . $prev . '/' . $colPos;
            $is_selected += intval($edit_record == $inValue);
            $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>[ ' . $LANG->getLL('newLabel', 1) . ' ]</option>';
        }
        // If none is yet selected...
        if (!$is_selected) {
            $opt[] = '<option value=""></option>';
            $opt[] = '<option value="' . $edit_record . '"  selected="selected">[ ' . $LANG->getLL('newLabel', 1) . ' ]</option>';
        }
        // Splitting the edit-record cmd value into table/uid:
        $this->eRParts = explode(':', $edit_record);
        // Delete-button flag?
        $this->deleteButton = t3lib_div::testInt($this->eRParts[1]) && $edit_record && ($this->eRParts[0] != 'pages' && $this->EDIT_CONTENT || $this->eRParts[0] == 'pages' && $this->CALC_PERMS & 4);
        // If undo-button should be rendered (depends on available items in sys_history)
        $this->undoButton = 0;
        $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->eRParts[0], 'sys_history') . ' AND recuid=' . intval($this->eRParts[1]), '', 'tstamp DESC', '1');
        if ($this->undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes)) {
            $this->undoButton = 1;
        }
        // Setting up the Return URL for coming back to THIS script (if links take the user to another script)
        $R_URL_parts = parse_url(t3lib_div::getIndpEnv('REQUEST_URI'));
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:db_layout.php

示例10: render_previewContent

 /**
  * Returns an HTMLized preview of a certain content element. If you'd like to register a new content type, you can easily use the hook
  * provided at the beginning of the function.
  *
  * @param	array		$row: The row of tt_content containing the content element record.
  * @return	string		HTML preview content
  * @access protected
  * @see		getContentTree(), render_localizationInfoTable()
  */
 function render_previewContent($row)
 {
     global $TYPO3_CONF_VARS, $LANG;
     $hookObjectsArr = $this->hooks_prepareObjectsArray('renderPreviewContentClass');
     $alreadyRendered = FALSE;
     $output = '';
     // Hook: renderPreviewContent_preProcess. Set 'alreadyRendered' to true if you provided a preview content for the current cType !
     reset($hookObjectsArr);
     while (list(, $hookObj) = each($hookObjectsArr)) {
         if (method_exists($hookObj, 'renderPreviewContent_preProcess')) {
             $output .= $hookObj->renderPreviewContent_preProcess($row, 'tt_content', $alreadyRendered, $this);
         }
     }
     if (!$alreadyRendered) {
         // Preview content for non-flexible content elements:
         switch ($row['CType']) {
             case 'text':
                 //	Text
             //	Text
             case 'table':
                 //	Table
             //	Table
             case 'mailform':
                 //	Form
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'bodytext'), 1) . '</strong> ' . htmlspecialchars(t3lib_div::fixed_lgd_cs(trim(strip_tags($row['bodytext'])), 2000)), 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'image':
                 //	Image
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'image'), 1) . '</strong><br /> ', 'tt_content', $row['uid']) . t3lib_BEfunc::thumbCode($row, 'tt_content', 'image', $this->doc->backPath) . '<br />';
                 break;
             case 'textpic':
                 //	Text w/image
             //	Text w/image
             case 'splash':
                 //	Textbox
                 $thumbnail = '<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'image'), 1) . '</strong><br />';
                 $thumbnail .= t3lib_BEfunc::thumbCode($row, 'tt_content', 'image', $this->doc->backPath);
                 $text = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'bodytext'), 1) . '</strong> ' . htmlspecialchars(t3lib_div::fixed_lgd_cs(trim(strip_tags($row['bodytext'])), 2000)), 'tt_content', $row['uid']);
                 $output = '<table><tr><td valign="top">' . $text . '</td><td valign="top">' . $thumbnail . '</td></tr></table>' . '<br />';
                 break;
             case 'bullets':
                 //	Bullets
                 $htmlBullets = '';
                 $bulletsArr = explode("\n", t3lib_div::fixed_lgd_cs($row['bodytext'], 2000));
                 if (is_array($bulletsArr)) {
                     foreach ($bulletsArr as $listItem) {
                         $htmlBullets .= htmlspecialchars(trim(strip_tags($listItem))) . '<br />';
                     }
                 }
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'bodytext'), 1) . '</strong><br />' . $htmlBullets, 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'uploads':
                 //	Filelinks
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'media'), 1) . '</strong><br />' . str_replace(',', '<br />', htmlspecialchars(t3lib_div::fixed_lgd_cs(trim(strip_tags($row['media'])), 2000))), 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'multimedia':
                 //	Multimedia
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'multimedia'), 1) . '</strong><br />' . str_replace(',', '<br />', htmlspecialchars(t3lib_div::fixed_lgd_cs(trim(strip_tags($row['multimedia'])), 2000))), 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'menu':
                 //	Menu / Sitemap
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'menu_type')) . '</strong> ' . $LANG->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'menu_type', $row['menu_type'])) . '<br />' . '<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'pages')) . '</strong> ' . $row['pages'], 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'list':
                 //	Insert Plugin
                 $extraInfo = $this->render_previewContent_extraPluginInfo($row);
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'list_type')) . '</strong> ' . htmlspecialchars($LANG->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'list_type', $row['list_type']))) . ' &ndash; ' . htmlspecialchars($extraInfo ? $extraInfo : $row['list_type']), 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'html':
                 //	HTML
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'bodytext'), 1) . '</strong> ' . htmlspecialchars(t3lib_div::fixed_lgd_cs(trim($row['bodytext']), 2000)), 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'header':
                 // Header
                 $output = $this->link_edit('<strong>' . $LANG->sL(t3lib_BEfunc::getItemLabel('tt_content', 'header'), 1) . '</strong> ' . htmlspecialchars(t3lib_div::fixed_lgd_cs(trim(strip_tags($row['header'])), 2000)), 'tt_content', $row['uid']) . '<br />';
                 break;
             case 'search':
                 //	Search Box
             //	Search Box
             case 'login':
                 //	Login Box
             //	Login Box
             case 'shortcut':
                 //	Insert records
             //	Insert records
             case 'div':
                 //	Divider
             //	Divider
             case 'templavoila_pi1':
                 //	Flexible Content Element: Rendered directly in getContentTree*()
                 break;
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:index.php

示例11: getPreviewLabel

 /**
  * @return string
  */
 protected function getPreviewLabel()
 {
     return $GLOBALS['LANG']->sL(t3lib_BEfunc::getLabelFromItemlist('tt_content', 'CType', $this->previewField));
 }
开发者ID:rod86,项目名称:t3sandbox,代码行数:7,代码来源:class.tx_templavoila_preview_type_media.php


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