• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP t3lib_BEfunc类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: processDatamap_afterDatabaseOperations

 /**
  * Generate a different preview link
  *
  * @param string $status status
  * @param string $table table name
  * @param integer $recordUid id of the record
  * @param array $fields fieldArray
  * @param t3lib_TCEmain $parentObject parent Object
  * @return void
  */
 public function processDatamap_afterDatabaseOperations($status, $table, $recordUid, array $fields, t3lib_TCEmain $parentObject)
 {
     // Clear category cache
     if ($table === 'tx_news_domain_model_category') {
         $cache = t3lib_div::makeInstance('Tx_News_Service_CacheService', 'news_categorycache');
         $cache->flush();
     }
     // Preview link
     if ($table === 'tx_news_domain_model_news') {
         // direct preview
         if (!is_numeric($recordUid)) {
             $recordUid = $parentObject->substNEWwithIDs[$recordUid];
         }
         if (isset($GLOBALS['_POST']['_savedokview_x']) && !$fields['type']) {
             // If "savedokview" has been pressed and current article has "type" 0 (= normal news article)
             $pagesTsConfig = t3lib_BEfunc::getPagesTSconfig($GLOBALS['_POST']['popViewId']);
             if ($pagesTsConfig['tx_news.']['singlePid']) {
                 $record = t3lib_BEfunc::getRecord('tx_news_domain_model_news', $recordUid);
                 $parameters = array('no_cache' => 1, 'tx_news_pi1[controller]' => 'News', 'tx_news_pi1[action]' => 'detail', 'tx_news_pi1[news_preview]' => $record['uid']);
                 if ($record['sys_language_uid'] > 0) {
                     if ($record['l10n_parent'] > 0) {
                         $parameters['tx_news_pi1[news_preview]'] = $record['l10n_parent'];
                     }
                     $parameters['L'] = $record['sys_language_uid'];
                 }
                 $GLOBALS['_POST']['popViewId_addParams'] = t3lib_div::implodeArrayForUrl('', $parameters, '', FALSE, TRUE);
                 $GLOBALS['_POST']['popViewId'] = $pagesTsConfig['tx_news.']['singlePid'];
             }
         }
     }
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:41,代码来源:Tcemain.php


示例2: indexAction

 /**
  * Renders the review module user dependent with all workspaces.
  * The module will show all records of one workspace.
  *
  * @return void
  */
 public function indexAction()
 {
     $wsService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
     $this->view->assign('showGrid', !($GLOBALS['BE_USER']->workspace === 0 && !$GLOBALS['BE_USER']->isAdmin()));
     $this->view->assign('showAllWorkspaceTab', $GLOBALS['BE_USER']->isAdmin());
     $this->view->assign('pageUid', t3lib_div::_GP('id'));
     $this->view->assign('showLegend', !($GLOBALS['BE_USER']->workspace === 0 && !$GLOBALS['BE_USER']->isAdmin()));
     $wsList = $wsService->getAvailableWorkspaces();
     $activeWorkspace = $GLOBALS['BE_USER']->workspace;
     $performWorkspaceSwitch = FALSE;
     if (!$GLOBALS['BE_USER']->isAdmin()) {
         $wsCur = array($activeWorkspace => true);
         $wsList = array_intersect_key($wsList, $wsCur);
     } else {
         $wsList = $wsService->getAvailableWorkspaces();
         if (strlen(t3lib_div::_GP('workspace'))) {
             $switchWs = (int) t3lib_div::_GP('workspace');
             if (in_array($switchWs, array_keys($wsList)) && $activeWorkspace != $switchWs) {
                 $activeWorkspace = $switchWs;
                 $GLOBALS['BE_USER']->setWorkspace($activeWorkspace);
                 $performWorkspaceSwitch = TRUE;
                 t3lib_BEfunc::setUpdateSignal('updatePageTree');
             } elseif ($switchWs == tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
                 $this->redirect('fullIndex');
             }
         }
     }
     $this->view->assign('performWorkspaceSwitch', $performWorkspaceSwitch);
     $this->view->assign('workspaceList', $wsList);
     $this->view->assign('activeWorkspaceUid', $activeWorkspace);
     $this->view->assign('activeWorkspaceTitle', tx_Workspaces_Service_Workspaces::getWorkspaceTitle($activeWorkspace));
     $this->view->assign('showPreviewLink', $wsService->canCreatePreviewLink(t3lib_div::_GP('id'), $activeWorkspace));
     $GLOBALS['BE_USER']->setAndSaveSessionData('tx_workspace_activeWorkspace', $activeWorkspace);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:40,代码来源:ReviewController.php


示例3: getLangModes

 /**
  * Check all "root" sys_templates and try to find the value for config.sys_language_mode
  */
 public function getLangModes()
 {
     $message = '';
     $checked = array('ok' => array(), 'fail' => array());
     $value = $GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:reports.ok.value');
     $severity = tx_reports_reports_status_Status::OK;
     $rootTpls = t3lib_BEfunc::getRecordsByField('sys_template', 'root', '1', '', 'pid');
     foreach ($rootTpls as $tpl) {
         /**
          * @var t3lib_tsparser_ext
          */
         $tmpl = t3lib_div::makeInstance("t3lib_tsparser_ext");
         $tmpl->tt_track = 0;
         $tmpl->init();
         // Gets the rootLine
         $sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
         $rootLine = $sys_page->getRootLine($tpl['pid']);
         $tmpl->runThroughTemplates($rootLine, $tpl['uid']);
         $tplRow = $tmpl->ext_getFirstTemplate($tpl['pid'], $tpl['uid']);
         $tmpl->generateConfig();
         if (!isset($tmpl->setup['config.']['sys_language_mode']) || $tmpl->setup['config.']['sys_language_mode'] != 'ignore') {
             $checked['fail'][] = array($tpl['pid'], $tpl['uid'], $tmpl->setup['config.']['sys_language_mode']);
         }
     }
     if (count($checked['fail'])) {
         $severity = tx_reports_reports_status_Status::WARNING;
         $value = $GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:reports.fail.value');
         $message .= $GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:reports.fail.message') . '<br/>';
         foreach ($checked['fail'] as $fail) {
             $message .= vsprintf($GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:reports.fail.message.detail'), $fail) . '<br />';
         }
     }
     return t3lib_div::makeInstance('tx_reports_reports_status_Status', 'EXT:languagevisibility config.sys_language_mode', $value, $message, $severity);
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:37,代码来源:class.tx_languagevisibility_reports_ConfigurationStatus.php


示例4: preStartPageHook

    /**
     * Hook-function: inject JavaScript code before the BE page is compiled
     * called in typo3/template.php:startPage
     *
     * @param array $parameters (not very usable, as it just contains a title..)
     * @param template $pObj
     */
    function preStartPageHook($parameters, $pObj)
    {
        // Only add JS if this is the top TYPO3 frame/document
        if ($pObj->bodyTagId == 'typo3-backend-php') {
            $tinymce_rte = t3lib_div::makeInstance('tx_tinymce_rte_base');
            $pageTSconfig = t3lib_BEfunc::getPagesTSconfig(0);
            $conf = $pageTSconfig['RTE.']['pageLoad.'];
            $conf = $tinymce_rte->init($conf);
            $conf['init.']['mode'] = 'none';
            unset($conf['init.']['spellchecker_rpc_url']);
            $pObj->JScode .= $tinymce_rte->getCoreScript($conf);
            //$pObj->JScode .= $tinymce_rte->getInitScript( $conf['init.'] );
            $pObj->JScode .= '
				<script type="text/javascript">
					function typo3filemanager(field_name, url, type, win) {
						if( document.getElementById("typo3-contentContainer") && 
								document.getElementById("typo3-contentContainer").getElementsByTagName("iframe")[0] && 
								document.getElementById("typo3-contentContainer").getElementsByTagName("iframe")[0].contentWindow &&
								document.getElementById("typo3-contentContainer").getElementsByTagName("iframe")[0].contentWindow.typo3filemanager ) {
							// TYPO3 4.5
							document.getElementById("typo3-contentContainer").getElementsByTagName("iframe")[0].contentWindow.typo3filemanager(field_name, url, type, win);
						} else if( document.getElementById("content").contentWindow.list_frame && document.getElementById("content").contentWindow.list_frame.typo3filemanager ) {
							// < TYPO3 4.5
							document.getElementById("content").contentWindow.list_frame.typo3filemanager(field_name, url, type, win);
						} else {
							// < TYPO3 4.5 compact mode
							document.getElementById("content").contentWindow.typo3filemanager(field_name, url, type, win);
						}
					}
				</script>
			';
        }
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:40,代码来源:class.tx_tinymce_rte_header.php


示例5: 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


示例6: render_previewContent

	/**
	 * (non-PHPdoc)
	 * @see classes/preview/tx_templavoila_preview_type_text#render_previewContent($row, $table, $output, $alreadyRendered, $ref)
	 */
	public function render_previewContent ($row, $table, $output, $alreadyRendered, &$ref) {

		$this->parentObj = $ref;

		$uploadDir = $GLOBALS['TCA']['tt_content']['columns']['image']['config']['internal_type'] == 'file_reference' ? '' : NULL;

		$thumbnail = '<strong>'.$GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('tt_content','image'),1).'</strong><br />';
		$thumbnail .= t3lib_BEfunc::thumbCode($row, 'tt_content', 'image', $ref->doc->backPath, '', $uploadDir);

		$label = $this->getPreviewLabel();
		$data = $this->getPreviewData($row);

		if ($ref->currentElementBelongsToCurrentPage) {
			$text = $ref->link_edit('<strong>'. $label .'</strong> ' . $data ,'tt_content',$row['uid']);
		} else {
			$text = '<strong>'. $label .'</strong> ' . $data;
		}

		return '
		<table>
			<tr>
				<td valign="top">' . $text . '</td>
				<td valign="top">' . $thumbnail . '</td>
			</tr>
		</table>';
	}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:30,代码来源:class.tx_templavoila_preview_type_textpic.php


示例7: autoPublishWorkspaces

    /**
     * This method is called by the Scheduler task that triggers
     * the autopublication process
     * It searches for workspaces whose publication date is in the past
     * and publishes them
     *
     * @return	void
     */
    public function autoPublishWorkspaces()
    {
        global $TYPO3_CONF_VARS;
        // Temporarily set admin rights
        // FIXME: once workspaces are cleaned up a better solution should be implemented
        $currentAdminStatus = $GLOBALS['BE_USER']->user['admin'];
        $GLOBALS['BE_USER']->user['admin'] = 1;
        // Select all workspaces that needs to be published / unpublished:
        $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,swap_modes,publish_time,unpublish_time', 'sys_workspace', 'pid=0
				AND
				((publish_time!=0 AND publish_time<=' . intval($GLOBALS['EXEC_TIME']) . ')
				OR (publish_time=0 AND unpublish_time!=0 AND unpublish_time<=' . intval($GLOBALS['EXEC_TIME']) . '))' . t3lib_BEfunc::deleteClause('sys_workspace'));
        $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
        foreach ($workspaces as $rec) {
            // First, clear start/end time so it doesn't get select once again:
            $fieldArray = $rec['publish_time'] != 0 ? array('publish_time' => 0) : array('unpublish_time' => 0);
            $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_workspace', 'uid=' . intval($rec['uid']), $fieldArray);
            // Get CMD array:
            $cmd = $workspaceService->getCmdArrayForPublishWS($rec['uid'], $rec['swap_modes'] == 1);
            // $rec['swap_modes']==1 means that auto-publishing will swap versions, not just publish and empty the workspace.
            // Execute CMD array:
            $tce = t3lib_div::makeInstance('t3lib_TCEmain');
            $tce->stripslashes_values = 0;
            $tce->start(array(), $cmd);
            $tce->process_cmdmap();
        }
        // Restore admin status
        $GLOBALS['BE_USER']->user['admin'] = $currentAdminStatus;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:37,代码来源:AutoPublish.php


示例8: render

 /**
  * Renders a record list as known from the TYPO3 list module
  * Note: This feature is experimental!
  *
  * @param string $tableName name of the database table
  * @param array $fieldList list of fields to be displayed. If empty, only the title column (configured in $TCA[$tableName]['ctrl']['title']) is shown
  * @param integer $storagePid by default, records are fetched from the storage PID configured in persistence.storagePid. With this argument, the storage PID can be overwritten
  * @param integer $levels corresponds to the level selector of the TYPO3 list module. By default only records from the current storagePid are fetched
  * @param string $filter corresponds to the "Search String" textbox of the TYPO3 list module. If not empty, only records matching the string will be fetched
  * @param integer $recordsPerPage amount of records to be displayed at once. Defaults to $TCA[$tableName]['interface']['maxSingleDBListItems'] or (if that's not set) to 100
  * @param string $sortField table field to sort the results by
  * @param boolean $sortDescending if TRUE records will be sorted in descending order
  * @param boolean $readOnly if TRUE, the edit icons won't be shown. Otherwise edit icons will be shown, if the current BE user has edit rights for the specified table!
  * @param boolean $enableClickMenu enables context menu
  * @param string $clickTitleMode one of "edit", "show" (only pages, tt_content), "info"
  * @param boolean $alternateBackgroundColors if set, rows will have alternate background colors
  * @return string the rendered record list
  * @see localRecordList
  */
 public function render($tableName, array $fieldList = array(), $storagePid = NULL, $levels = 0, $filter = '', $recordsPerPage = 0, $sortField = '', $sortDescending = FALSE, $readOnly = FALSE, $enableClickMenu = TRUE, $clickTitleMode = NULL, $alternateBackgroundColors = FALSE)
 {
     $pageinfo = t3lib_BEfunc::readPageAccess(t3lib_div::_GP('id'), $GLOBALS['BE_USER']->getPagePermsClause(1));
     $dblist = t3lib_div::makeInstance('localRecordList');
     $dblist->backPath = $GLOBALS['BACK_PATH'];
     $dblist->pageRow = $pageinfo;
     if ($readOnly === FALSE) {
         $dblist->calcPerms = $GLOBALS['BE_USER']->calcPerms($pageinfo);
     }
     $dblist->showClipboard = FALSE;
     $dblist->disableSingleTableView = TRUE;
     $dblist->clickTitleMode = $clickTitleMode;
     $dblist->alternateBgColors = $alternateBackgroundColors;
     $dblist->clickMenuEnabled = $enableClickMenu;
     if ($storagePid === NULL) {
         $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
         $storagePid = $frameworkConfiguration['persistence']['storagePid'];
     }
     $dblist->start($storagePid, $tableName, (int) t3lib_div::_GP('pointer'), $filter, $levels, $recordsPerPage);
     $dblist->allFields = TRUE;
     $dblist->dontShowClipControlPanels = TRUE;
     $dblist->displayFields = FALSE;
     $dblist->setFields = array($tableName => $fieldList);
     $dblist->noControlPanels = TRUE;
     $dblist->sortField = $sortField;
     $dblist->sortRev = $sortDescending;
     $dblist->script = $_SERVER['REQUEST_URI'];
     $dblist->generateList();
     return $dblist->HTMLcode;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:49,代码来源:TableListViewHelper.php


示例9: getCurrentItem

 /**
  * Die dazu das aktuelle item für eine Detailseite zu holen bzw dieses zurückzusetzen.
  * Dazu muss den Linker einfach folgendes für den action namen liefern: "show" + den eigentlichen key.
  * 
  * Dann brauch man in der Detailansicht noch einen Button nach folgendem Schema:
  * $markerArray['###NEWSEARCHBTN###'] = $formTool->createSubmit('showHowTo[clear]', '###LABEL_BUTTON_BACK###'); 
  * 
  * @param string $key
  * @param tx_rnbase_mod_IModule $module
  * 
  * @return tx_rnbase_model_base
  */
 public static function getCurrentItem($key, tx_rnbase_mod_IModule $module)
 {
     $itemid = 0;
     $data = t3lib_div::_GP('show' . $key);
     if ($data) {
         list($itemid, ) = each($data);
     }
     $dataKey = 'current' . $key;
     if ($itemid === 'clear') {
         $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), array($dataKey => '0'), $module->getName());
         return false;
     }
     // Daten mit Modul abgleichen
     $changed = $itemid ? array($dataKey => $itemid) : array();
     $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), $changed, $module->getName());
     $itemid = $data[$dataKey];
     if (!$itemid) {
         return false;
     }
     $modelData = explode('|', $itemid);
     $item = tx_rnbase::makeInstance($modelData[0], $modelData[1]);
     if (!$item->isValid()) {
         $item = null;
         //auf null setzen damit die Suche wieder angezeigt wird
     }
     return $item;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:39,代码来源:class.tx_mklib_mod1_util_Helper.php


示例10: __construct

 /**
  * constructor
  *
  * @param	TYPO3backend	TYPO3 backend object reference
  */
 public function __construct(TYPO3backend &$backendReference = null)
 {
     $this->backendReference = $backendReference;
     $this->cacheActions = array();
     $this->optionValues = array('all', 'pages');
     // Clear cache for ALL tables!
     if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.all')) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_all', true);
         $this->cacheActions[] = array('id' => 'all', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=all&ajaxCall=1' . t3lib_BEfunc::getUrlToken('tceAction'), 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-high'));
     }
     // Clear cache for either ALL pages
     if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.pages')) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_pages', true);
         $this->cacheActions[] = array('id' => 'pages', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=pages&ajaxCall=1' . t3lib_BEfunc::getUrlToken('tceAction'), 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-medium'));
     }
     // Clearing of cache-files in typo3conf/ + menu
     if ($GLOBALS['BE_USER']->isAdmin() && $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache']) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_allTypo3Conf', true);
         $this->cacheActions[] = array('id' => 'temp_CACHED', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=temp_CACHED&ajaxCall=1' . t3lib_BEfunc::getUrlToken('tceAction'), 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-low'));
     }
     // hook for manipulate cacheActions
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'] as $cacheAction) {
             $hookObject = t3lib_div::getUserObj($cacheAction);
             if (!$hookObject instanceof backend_cacheActionsHook) {
                 throw new UnexpectedValueException('$hookObject must implement interface backend_cacheActionsHook', 1228262000);
             }
             $hookObject->manipulateCacheActions($this->cacheActions, $this->optionValues);
         }
     }
     t3lib_formprotection_Factory::get()->persistTokens();
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:37,代码来源:class.clearcachemenu.php


示例11: issueTitle

 /**
  * issue title
  *
  * @param object $parameters
  * @param object $parentObject
  *
  * @return void
  */
 public function issueTitle(&$parameters, $parentObject)
 {
     $titleLength = $GLOBALS['BE_USER']->uc['titleLen'] ? $GLOBALS['BE_USER']->uc['titleLen'] : 30;
     $record = t3lib_BEfunc::getRecord($parameters['table'], $parameters['row']['uid']);
     $newTitle = $record['extension'] . ': ' . $record['inspection'];
     $parameters['title'] = htmlspecialchars(t3lib_div::fixed_lgd_cs($newTitle, $titleLength));
 }
开发者ID:pitscribble,项目名称:typo3-upgradereport,代码行数:15,代码来源:Tca.php


示例12: calcPerms

 /**
  * Returns a combined binary representation of the current users permissions for the page-record, $row.
  * The perms for user, group and everybody is OR'ed together (provided that the page-owner is the user and for the groups that the user is a member of the group
  * If the user is admin, 31 is returned	(full permissions for all five flags)
  *
  * @param	array		Input page row with all perms_* fields available.
  * @param	object		BE User Object
  * @return	integer		Bitwise representation of the users permissions in relation to input page row, $row
  */
 public function calcPerms($params, $that)
 {
     $row = $params['row'];
     $beAclConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['be_acl']);
     if (!$beAclConfig['disableOldPermissionSystem']) {
         $out = $params['outputPermissions'];
     } else {
         $out = 0;
     }
     $rootLine = t3lib_BEfunc::BEgetRootLine($row['uid']);
     $i = 0;
     $takeUserIntoAccount = 1;
     $groupIdsAlreadyUsed = array();
     foreach ($rootLine as $level => $values) {
         if ($i != 0) {
             $recursive = ' AND recursive=1';
         } else {
             $recursive = '';
         }
         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_beacl_acl', 'pid=' . intval($values['uid']) . $recursive, '', 'recursive ASC');
         while ($result = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
             if ($result['type'] == 0 && $that->user['uid'] == $result['object_id'] && $takeUserIntoAccount) {
                 // user has to be taken into account
                 $out |= $result['permissions'];
                 $takeUserIntoAccount = 0;
             } elseif ($result['type'] == 1 && $that->isMemberOfGroup($result['object_id']) && !in_array($result['object_id'], $groupIdsAlreadyUsed)) {
                 $out |= $result['permissions'];
                 $groupIdsAlreadyUsed[] = $result['object_id'];
             }
         }
         $i++;
     }
     return $out;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:43,代码来源:class.tx_beacl_userauthgroup.php


示例13: getOverLayRecordForCertainLanguageImplementation

 /**
  * This method is the implementation of an abstract parent method.
  * The method should return the overlay record for a certain language.
  *
  * (non-PHPdoc)
  * @see classes/tx_languagevisibility_element#getOverLayRecordForCertainLanguageImplementation($languageId)
  */
 protected function getOverLayRecordForCertainLanguageImplementation($languageId)
 {
     $ctrl = $GLOBALS['TCA'][$this->table]['ctrl'];
     // we can't use the exclude fields here because we might loose (hidden) parent-records
     if (is_object($GLOBALS['TSFE']->sys_page)) {
         $excludeClause = $GLOBALS['TSFE']->sys_page->deleteClause($this->table);
     } else {
         $excludeClause = t3lib_BEfunc::deleteClause($this->table);
     }
     if (isset($ctrl['versioningWS']) && $ctrl['versioningWS'] > 0) {
         $workspaces = '0,' . $GLOBALS['BE_USER']->workspace;
         $workspaceCondition = 't3ver_wsid IN (' . rtrim($workspaces, ',') . ') AND ';
     } else {
         $workspaceCondition = '';
     }
     // Select overlay record (Live workspace, initial placeholders included):
     $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $this->table, 'pid=' . intval($this->getPid()) . ' AND ' . $workspaceCondition . $ctrl['languageField'] . '=' . intval($languageId) . ($languageId > 0 ? ' AND ' . $ctrl['transOrigPointerField'] . '=' . intval($this->getUid()) : '') . $excludeClause, '', '', '1');
     $olrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
     $olrow = $this->getContextIndependentWorkspaceOverlay($this->table, $olrow);
     $GLOBALS['TYPO3_DB']->sql_free_result($res);
     if (!$this->getEnableFieldResult($olrow)) {
         $olrow = array();
     }
     return $olrow;
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:32,代码来源:class.tx_languagevisibility_recordelement.php


示例14: getRecords

 /**
  * Get the Records
  *
  * @param integer $startPage
  * @param array $basePages
  * @param Tx_GoogleServices_Controller_SitemapController $obj
  * @return Tx_GoogleServices_Domain_Model_Node
  */
 public function getRecords($startPage, $basePages, Tx_GoogleServices_Controller_SitemapController $obj)
 {
     $nodes = array();
     foreach ($basePages as $uid) {
         // Build URL
         $url = $obj->getUriBuilder()->setTargetPageUid($uid)->build();
         // can't generate a valid url
         if (!strlen($url)) {
             continue;
         }
         // Get Record
         $record = t3lib_BEfunc::getRecord('pages', $uid, "*", " AND tx_googleservicesext_hide_in_sitemap = 0");
         if (!is_array($record)) {
             continue;
         }
         // exclude Doctypes
         if (in_array($record['doktype'], array(4))) {
             continue;
         }
         // Build Node
         $node = new Tx_GoogleServices_Domain_Model_Node();
         $node->setLoc($url);
         $node->setPriority($this->getPriority($startPage, $record));
         $node->setChangefreq(Tx_GoogleServices_Service_SitemapDataService::mapTimeout2Period($record['cache_timeout']));
         $node->setLastmod($this->getModifiedDate($record));
         $nodes[] = $node;
     }
     return $nodes;
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:37,代码来源:Pages.php


示例15: main

    /**
     * Main function
     *
     * @return	void
     */
    function main()
    {
        switch ((string) t3lib_div::_GET('cmd')) {
            case 'menuitem':
                echo '
				<img src="gfx/x_t3logo.png" width="61" height="16" hspace="3" alt="" />';
                $menuItems = array(array('title' => 'About TYPO3', 'xurl' => 'http://typo3.com/', 'subitems' => array(array('title' => 'License', 'xurl' => 'http://typo3.com/License.1625.0.html'), array('title' => 'Support', 'subitems' => array(array('title' => 'Mailing lists', 'xurl' => 'http://lists.netfielders.de/cgi-bin/mailman/listinfo'), array('title' => 'Documentation', 'xurl' => 'http://typo3.org/documentation/'), array('title' => 'Find consultancy', 'xurl' => 'http://typo3.com/Consultancies.1248.0.html'))), array('title' => 'Contribute', 'xurl' => 'http://typo3.org/community/participate/'), array('title' => 'Donate', 'xurl' => 'http://typo3.com/Donations.1261.0.html', 'icon' => '1'))), array('title' => 'Extensions', 'url' => 'mod/tools/em/index.php'), array('title' => 'Menu preferences and such things', 'onclick' => 'alert("A dialog is now shown which will allow user configuration of items in the menu");event.stopPropagation();', 'state' => 'checked'), array('title' => '--div--'), array('title' => 'Recent Items', 'id' => $this->id . '_recent', 'subitems' => array(), 'html' => $this->menuItemObject($this->id . '_recent', '
							fetched: false,
							onActivate: function() {
//								if (!this.fetched)	{
									//Element.update("' . $this->id . '_recent-layer","asdfasdf");
									getElementContent("' . $this->id . '_recent-layer", 0, "logomenu.php?cmd=recent")
									this.fetched = true;
//								}
							}
						')), array('title' => '--div--'), array('title' => 'View frontend', 'xurl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL')), array('title' => 'Log out', 'onclick' => "top.document.location='logout.php';"));
                echo $this->menuLayer($menuItems);
                break;
            case 'recent':
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_log.*, MAX(sys_log.tstamp) AS tstamp_MAX', 'sys_log,pages', 'pages.uid=sys_log.event_pid AND sys_log.userid=' . intval($GLOBALS['BE_USER']->user['uid']) . ' AND sys_log.event_pid>0 AND sys_log.type=1 AND sys_log.action=2 AND sys_log.error=0', 'tablename,recuid', 'tstamp_MAX DESC', 20);
                $items = array();
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    $elRow = t3lib_BEfunc::getRecord($row['tablename'], $row['recuid']);
                    if (is_array($elRow)) {
                        $items[] = array('title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'], $elRow), $GLOBALS['BE_USER']->uc['titleLen']) . ' - ' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp_MAX']), 'icon' => array(t3lib_iconworks::getIcon($row['tablename'], $elRow), 'width="18" height="16"'), 'onclick' => 'content.' . t3lib_BEfunc::editOnClick('&edit[' . $row['tablename'] . '][' . $row['recuid'] . ']=edit', '', 'dummy.php'));
                    }
                }
                echo $this->menuItems($items);
                break;
        }
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:36,代码来源:logomenu.php


示例16: getNewIcon

 /**
  * Returns the New Icon with link
  *
  * @param string $table Table name
  * @param array $row Data row
  * @return string html output
  */
 protected function getNewIcon($table, array $row)
 {
     $params .= '&edit[' . $table . '][' . $row['storagePid'] . ']=new';
     $title = Tx_Extbase_Utility_Localization::translate('be.newEvent', 'woehrl_seminare', $arguments = NULL);
     $icon = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $this->backPath, -1)) . '" title="' . $title . '">' . t3lib_iconWorks::getSpriteIcon('actions-document-new') . '</a>';
     return $icon;
 }
开发者ID:woehrlag,项目名称:Intranet,代码行数:14,代码来源:FunctionBarViewHelper.php


示例17: main

 /**
  * Main function
  *
  * @param clickMenu reference parent object
  * @param array menutitems for manipultation
  * @param string table name
  * @param int uid
  * @return array manipulated menuitems
  */
 function main(clickMenu $backRef, array $menuItems, $table, $uid)
 {
     if ($table != 'tx_crawler_configuration') {
         // early return without doing anything
         return $menuItems;
     }
     $localItems = array();
     $row = t3lib_BEfunc::getRecord($table, $uid, 'pid, name, processing_instruction_filter', '', true);
     if (!empty($row)) {
         if (version_compare(TYPO3_version, '4.5.0', '>=')) {
             $url = t3lib_extMgm::extRelPath('info') . 'mod1/index.php';
         } else {
             $url = $backRef->backPath . 'mod/web/info/index.php';
         }
         $url .= '?id=' . intval($row['pid']);
         $url .= '&SET[function]=tx_crawler_modfunc1';
         $url .= '&SET[crawlaction]=start';
         $url .= '&configurationSelection[]=' . $row['name'];
         foreach (t3lib_div::trimExplode(',', $row['processing_instruction_filter']) as $processing_instruction) {
             $url .= '&procInstructions[]=' . $processing_instruction;
         }
         // $onClick = $backRef->urlRefForCM($url);
         $onClick = "top.nextLoadModuleUrl='" . $url . "';top.goToModule('web_info',1);";
         $localItems[] = $backRef->linkItem('Crawl', $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('crawler') . 'icon_tx_crawler_configuration.gif" border="0" align="top" alt="" />'), $onClick, 0);
     }
     return array_merge($menuItems, $localItems);
 }
开发者ID:bia-nca,项目名称:crawler,代码行数:36,代码来源:class.tx_crawler_contextMenu.php


示例18: prepareRecordsFrom

 private function prepareRecordsFrom($table)
 {
     $tableRows = $this->getExportableRowUids($table);
     foreach ($tableRows as $uid => $a) {
         $this->_txImpexpInstance->export_addRecord($table, t3lib_BEfunc::getRecord($table, $uid));
     }
 }
开发者ID:nforgerit,项目名称:TYPO3-Transition-Tool,代码行数:7,代码来源:Exporter.php


示例19: getSiteUrl

 /**
  * Obtains site URL.
  *
  * @static
  * @param int $pageId
  * @return string
  */
 protected static function getSiteUrl($pageId)
 {
     $domain = t3lib_BEfunc::firstDomainRecord(t3lib_BEfunc::BEgetRootLine($pageId));
     $pageRecord = t3lib_BEfunc::getRecord('pages', $pageId);
     $scheme = is_array($pageRecord) && isset($pageRecord['url_scheme']) && $pageRecord['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS ? 'https' : 'http';
     return $domain ? $scheme . '://' . $domain . '/' : t3lib_div::getIndpEnv('TYPO3_SITE_URL');
 }
开发者ID:educo-adymorz,项目名称:typo3-pagepath,代码行数:14,代码来源:class.tx_pagepath_api.php


示例20: init

 function init()
 {
     global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
     if (t3lib_div::_GP('pageId') < 0 || t3lib_div::_GP('pageId') == '' || t3lib_div::_GP('templateId') < 0 || t3lib_div::_GP('templateId') == '' || t3lib_div::_GP('ISOcode') == '') {
         die('if you want to us this mod you need at least to define pageId, templateId and ISOcode as GET parameter. Example path/to/TinyMCETemplate.php?pageId=7&templateId=2&ISOcode=en');
     }
     $this->pageId = t3lib_div::_GP('pageId');
     $this->templateId = t3lib_div::_GP('templateId');
     $this->ISOcode = t3lib_div::_GP('ISOcode');
     $this->pageTSconfig = t3lib_BEfunc::getPagesTSconfig($this->pageId);
     if (t3lib_div::_GP('mode') != 'FE') {
         $this->conf = $this->pageTSconfig['RTE.']['default.'];
     } else {
         $this->conf = $this->pageTSconfig['RTE.']['default.']['FE.'];
     }
     $LANG->init(strtolower($this->ISOcode));
     $this->tinymce_rte = t3lib_div::makeInstance('tx_tinymce_rte_base');
     $this->conf = $this->tinymce_rte->init($this->conf);
     $row = array('pid' => $this->pageId, 'ISOcode' => $this->ISOcode);
     $this->conf = $this->tinymce_rte->fixTinyMCETemplates($this->conf, $row);
     if (is_array($this->conf['TinyMCE_templates.'][$this->templateId]) && $this->conf['TinyMCE_templates.'][$this->templateId]['include'] != '') {
         if (is_file($this->conf['TinyMCE_templates.'][$this->templateId]['include'])) {
             include_once $this->conf['TinyMCE_templates.'][$this->templateId]['include'];
         } else {
             die('no file found at include path');
         }
     }
 }
开发者ID:sercagil,项目名称:TYPO3-tinymce_rte,代码行数:28,代码来源:class.tx_tinymce_rte_templates.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP t3lib_div类代码示例发布时间:2022-05-23
下一篇:
PHP system类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap