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

PHP t3lib_div类代码示例

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

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



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

示例1: render

 /**
  * Renders <f:then> child if BE user is allowed to edit given table, otherwise renders <f:else> child.
  *
  * @param string $table Name of the table
  * @return string the rendered string
  * @api
  */
 public function render($table)
 {
     if ($GLOBALS['BE_USER']->isAdmin() || t3lib_div::inList($GLOBALS['BE_USER']->groupData['tables_modify'], $table)) {
         return $this->renderThenChild();
     }
     return $this->renderElseChild();
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:14,代码来源:IfAccessToTableIsAllowedViewHelper.php


示例2: __construct

 /**
  * constructor
  * 
  * @param Tx_CzSimpleCal_Domain_Repository_EventRepository $eventRepository
  * @param Tx_CzSimpleCal_Domain_Repository_EventIndexRepository $eventIndexRepository
  * @param Tx_Extbase_Persistence_ManagerInterface $persistenceManager
  */
 public function __construct(Tx_CzSimpleCal_Domain_Repository_EventRepository $eventRepository, Tx_CzSimpleCal_Domain_Repository_EventIndexRepository $eventIndexRepository, Tx_Extbase_Persistence_ManagerInterface $persistenceManager)
 {
     t3lib_div::makeInstance('Tx_Extbase_Dispatcher');
     $this->eventRepository = $eventRepository;
     $this->eventIndexRepository = $eventIndexRepository;
     $this->persistenceManager = $persistenceManager;
 }
开发者ID:TYPO3-typo3org,项目名称:community,代码行数:14,代码来源:Event.php


示例3: main

 /**
  * Processing of clickmenu items
  *
  * @param	object		Reference to parent
  * @param	array		Menu items array to modify
  * @param	string		Table name
  * @param	integer		Uid of the record
  * @return	array		Menu item array, returned after modification
  * @todo	Skinning for icons...
  */
 function main(&$backRef, $menuItems, $table, $uid)
 {
     global $BE_USER, $TCA;
     $localItems = array();
     if ($backRef->cmLevel && t3lib_div::_GP('subname') == 'moreoptions' || $table === 'pages' && $uid == 0) {
         // Show import/export on second level menu OR root level.
         $LL = $this->includeLL();
         $modUrl = $backRef->backPath . t3lib_extMgm::extRelPath('impexp') . 'app/index.php';
         $url = $modUrl . '?tx_impexp[action]=export&id=' . ($table == 'pages' ? $uid : $backRef->rec['pid']);
         if ($table == 'pages') {
             $url .= '&tx_impexp[pagetree][id]=' . $uid;
             $url .= '&tx_impexp[pagetree][levels]=0';
             $url .= '&tx_impexp[pagetree][tables][]=_ALL';
         } else {
             $url .= '&tx_impexp[record][]=' . rawurlencode($table . ':' . $uid);
             $url .= '&tx_impexp[external_ref][tables][]=_ALL';
         }
         $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-export-t3d')), $backRef->urlRefForCM($url), 1);
         if ($table == 'pages') {
             $url = $modUrl . '?id=' . $uid . '&table=' . $table . '&tx_impexp[action]=import';
             $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
         }
     }
     return array_merge($menuItems, $localItems);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:35,代码来源:class.tx_impexp_clickmenu.php


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


示例5: __construct

 /**
  * constructor for class Tx_Solr_ViewHelper_Date
  */
 public function __construct(array $arguments = array())
 {
     if (is_null($this->dateFormat) || is_null($this->contentObject)) {
         $this->dateFormat = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['general.']['dateFormat.'];
         $this->contentObject = t3lib_div::makeInstance('tslib_cObj');
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:10,代码来源:Date.php


示例6: getResultReturnsAllResults

 /**
  * @test
  */
 public function getResultReturnsAllResults()
 {
     $request = t3lib_div::makeInstance('Tx_Solr_IndexQueue_PageIndexerResponse');
     $request->addActionResult('action1', 'result1');
     $request->addActionResult('action2', 'result2');
     $this->assertEquals(array('action1' => 'result1', 'action2' => 'result2'), $request->getActionResult());
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:10,代码来源:PageIndexerResponseTest.php


示例7: _render

 function _render($conf)
 {
     require_once PATH_formidable . "api/class.tx_ameosformidable.php";
     $this->oForm = t3lib_div::makeInstance("tx_ameosformidable");
     $this->oForm->initFromTs($this, $conf);
     return $this->oForm->render();
 }
开发者ID:preinboth,项目名称:formidable,代码行数:7,代码来源:class.user_ameosformidable_cobj.php


示例8: isIpInRange

 /**
  * Check if the remote IP is the allowed range.
  * Supports IPv4 and IPv6.
  *
  * @param string  $strIp    remote IP address
  * @param boolean $bIpv4    If the IP is IPv4 (if not, it's IPv6)
  * @param string  $strRange Defined range. Comma-separated list of IPs.
  *                          * supported for parts of the address.
  *
  * @return boolean True if the IP is in the range
  */
 protected function isIpInRange($strIp, $bIpv4, $strRange)
 {
     if ($bIpv4) {
         return t3lib_div::cmpIPv4($strIp, $strRange);
     }
     return t3lib_div::cmpIPv6($strIp, $strRange);
 }
开发者ID:schams-net,项目名称:t3x-contexts,代码行数:18,代码来源:Ip.php


示例9: render_clickenlarge

 /**
  * Rendering the "clickenlarge" custom attribute, called from TypoScript
  *
  * @param	string		Content input. Not used, ignore.
  * @param	array		TypoScript configuration
  * @return	string		HTML output.
  * @access private
  */
 function render_clickenlarge($content, $conf)
 {
     $clickenlarge = isset($this->cObj->parameters['clickenlarge']) ? $this->cObj->parameters['clickenlarge'] : 0;
     $path = $this->cObj->parameters['src'];
     $pathPre = $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'] . 'RTEmagicC_';
     if (t3lib_div::isFirstPartOfStr($path, $pathPre)) {
         // Find original file:
         $pI = pathinfo(substr($path, strlen($pathPre)));
         $filename = substr($pI['basename'], 0, -strlen('.' . $pI['extension']));
         $file = $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'] . 'RTEmagicP_' . $filename;
     } else {
         $file = $this->cObj->parameters['src'];
     }
     unset($this->cObj->parameters['clickenlarge']);
     unset($this->cObj->parameters['allParams']);
     $content = '<img ' . t3lib_div::implodeAttributes($this->cObj->parameters, TRUE, TRUE) . ' />';
     if ($clickenlarge && is_array($conf['imageLinkWrap.'])) {
         $theImage = $file ? $GLOBALS['TSFE']->tmpl->getFileName($file) : '';
         if ($theImage) {
             $this->cObj->parameters['origFile'] = $theImage;
             if ($this->cObj->parameters['title']) {
                 $conf['imageLinkWrap.']['title'] = $this->cObj->parameters['title'];
             }
             if ($this->cObj->parameters['alt']) {
                 $conf['imageLinkWrap.']['alt'] = $this->cObj->parameters['alt'];
             }
             $content = $this->cObj->imageLinkWrap($content, $theImage, $conf['imageLinkWrap.']);
             $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
         }
     }
     return $content;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:40,代码来源:class.tx_rtehtmlarea_pi3.php


示例10: getAllowedActions

 public function getAllowedActions($config)
 {
     $pid = $config['row']['pid'];
     $tsConfig = t3lib_befunc::getPagesTSconfig($pid);
     $flexConfig =& $tsConfig['options.']['cz_simple_cal_pi1.']['flexform.'];
     if (empty($flexConfig) || !isset($flexConfig['allowedActions.'])) {
         return;
     }
     $allowedActions = array();
     if (isset($flexConfig['allowedActions'])) {
         $enabled = array();
         foreach (t3lib_div::trimExplode(',', $flexConfig['allowedActions'], true) as $i) {
             $enabled[$i . '.'] = '';
         }
         $allowedActions = array_intersect_key($flexConfig['allowedActions.'], $enabled);
     } else {
         $allowedActions = $flexConfig['allowedActions.'];
     }
     foreach ($allowedActions as $name => $action) {
         $name = rtrim($name, '.');
         $label = $GLOBALS['LANG']->sL($action['label']);
         if (empty($label)) {
             $label = $name;
         }
         $config['items'][$name] = array($label, $name);
     }
 }
开发者ID:TYPO3-typo3org,项目名称:community,代码行数:27,代码来源:FlexConfig.php


示例11: process

 /**
  * Logs the given values.
  *
  * @return void
  */
 public function process()
 {
     //set params
     $table = "tx_formhandler_log";
     $fields['ip'] = t3lib_div::getIndpEnv('REMOTE_ADDR');
     if (isset($this->settings['disableIPlog']) && intval($this->settings['disableIPlog']) == 1) {
         $fields['ip'] = NULL;
     }
     $fields['tstamp'] = time();
     $fields['crdate'] = time();
     $fields['pid'] = Tx_Formhandler_StaticFuncs::getSingle($this->settings, 'pid');
     if (!$fields['pid']) {
         $fields['pid'] = $GLOBALS['TSFE']->id;
     }
     ksort($this->gp);
     $keys = array_keys($this->gp);
     $serialized = serialize($this->gp);
     $hash = md5(serialize($keys));
     $fields['params'] = $serialized;
     $fields['key_hash'] = $hash;
     if (intval($this->settings['markAsSpam']) == 1) {
         $fields['is_spam'] = 1;
     }
     //query the database
     $res = $GLOBALS['TYPO3_DB']->exec_INSERTquery($table, $fields);
     $insertedUID = $GLOBALS['TYPO3_DB']->sql_insert_id();
     $sessionValues = array('inserted_uid' => $insertedUID, 'inserted_tstamp' => $fields['tstamp'], 'key_hash' => $hash);
     Tx_Formhandler_Globals::$session->setMultiple($sessionValues);
     if (!$this->settings['nodebug']) {
         Tx_Formhandler_StaticFuncs::debugMessage('logging', array($table, implode(',', $fields)));
         if (strlen($GLOBALS['TYPO3_DB']->sql_error()) > 0) {
             Tx_Formhandler_StaticFuncs::debugMessage('error', array($GLOBALS['TYPO3_DB']->sql_error()), 3);
         }
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:40,代码来源:Tx_Formhandler_Logger_DB.php


示例12: render

 /**
  * Render the facebook like viewhelper
  *
  * @return string
  */
 public function render()
 {
     $code = '';
     $url = !empty($this->arguments['href']) ? $this->arguments['href'] : t3lib_div::getIndpEnv('TYPO3_REQUEST_URL');
     // absolute urls are needed
     $this->tag->addAttribute('href', Tx_News_Utility_Url::prependDomain($url));
     $this->tag->forceClosingTag(TRUE);
     // -1 means no JS
     if ($this->arguments['javaScript'] != '-1') {
         if (empty($this->arguments['javaScript'])) {
             $tsSettings = $this->pluginSettingsService->getSettings();
             $locale = !empty($tsSettings['facebookLocale']) ? $tsSettings['facebookLocale'] : 'en_US';
             $code = '<script src="http://connect.facebook.net/' . $locale . '/all.js#xfbml=1"></script>';
             // Social interaction Google Analytics
             if ($this->pluginSettingsService->getByPath('analytics.social.facebookLike') == 1) {
                 $code .= t3lib_div::wrapJS("\n\t\t\t\t\t\tFB.Event.subscribe('edge.create', function(targetUrl) {\n\t\t\t\t\t\t \t_gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tFB.Event.subscribe('edge.remove', function(targetUrl) {\n\t\t\t\t\t\t  _gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]);\n\t\t\t\t\t\t});\n\t\t\t\t\t");
             }
         } else {
             $code = '<script src="' . htmlspecialchars($this->arguments['javaScript']) . '"></script>';
         }
     }
     // seems as if a div with id fb-root is needed this is just a dirty
     // workaround to make things work again Perhaps we should
     // use the iframe variation.
     $code .= '<div id="fb-root"></div>' . $this->tag->render();
     return $code;
 }
开发者ID:preinboth,项目名称:moox_social,代码行数:32,代码来源:LikeViewHelper.php


示例13: getDevMode

 public static function getDevMode()
 {
     if (self::$devMode === null) {
         self::$devMode = t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']);
     }
     return self::$devMode;
 }
开发者ID:rekrut,项目名称:typo3-extbase-doctrine2-extension,代码行数:7,代码来源:Manager.php


示例14: setCache

 /**
  * Initializes the identifier prefix when setting the cache.
  *
  * @param t3lib_cache_frontend_Frontend $cache The frontend for this backend
  * @return void
  * @author Robert Lemke <[email protected]>
  */
 public function setCache(t3lib_cache_frontend_Frontend $cache)
 {
     parent::setCache($cache);
     $processUser = extension_loaded('posix') ? posix_getpwuid(posix_geteuid()) : array('name' => 'default');
     $pathHash = t3lib_div::shortMD5(PATH_site . $processUser['name'], 12);
     $this->identifierPrefix = 'TYPO3_' . $pathHash;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:14,代码来源:class.t3lib_cache_backend_apcbackend.php


示例15: generateExtensionFromVersion1Configuration

 /**
  * This test creates an extension based on a JSON file, generated
  * with version 1.0 of the ExtensionBuilder and compares all
  * generated files with the originally created ones
  * This test should help, to find compatibility breaking changes
  *
  * @test
  */
 function generateExtensionFromVersion1Configuration()
 {
     $this->configurationManager = $this->getMock($this->buildAccessibleProxy('Tx_ExtensionBuilder_Configuration_ConfigurationManager'), array('dummy'));
     $this->extensionSchemaBuilder = $this->objectManager->get('Tx_ExtensionBuilder_Service_ExtensionSchemaBuilder');
     $testExtensionDir = PATH_typo3conf . 'ext/extension_builder/Tests/Examples/TestExtensions/test_extension_v1/';
     $jsonFile = $testExtensionDir . Tx_ExtensionBuilder_Configuration_ConfigurationManager::EXTENSION_BUILDER_SETTINGS_FILE;
     if (file_exists($jsonFile)) {
         // compatibility adaptions for configurations from older versions
         $extensionConfigurationJSON = json_decode(file_get_contents($jsonFile), TRUE);
         $extensionConfigurationJSON = $this->configurationManager->fixExtensionBuilderJSON($extensionConfigurationJSON);
     } else {
         $this->fail('JSON file not found');
     }
     $this->extension = $this->extensionSchemaBuilder->build($extensionConfigurationJSON);
     $this->codeGenerator->setSettings(array('codeTemplateRootPath' => PATH_typo3conf . 'ext/extension_builder/Resources/Private/CodeTemplates/Extbase/', 'extConf' => array('enableRoundtrip' => '0')));
     $newExtensionDir = vfsStream::url('testDir') . '/';
     $this->extension->setExtensionDir($newExtensionDir . 'test_extension/');
     $this->codeGenerator->build($this->extension);
     $referenceFiles = t3lib_div::getAllFilesAndFoldersInPath(array(), $testExtensionDir);
     foreach ($referenceFiles as $referenceFile) {
         $createdFile = str_replace($testExtensionDir, $this->extension->getExtensionDir(), $referenceFile);
         if (!in_array(basename($createdFile), array('ExtensionBuilder.json'))) {
             // json file is generated by controller
             $referenceFileContent = str_replace(array('2011-08-11', '###YEAR###'), array(date('Y-m-d'), date('Y')), file_get_contents($referenceFile));
             //t3lib_div::writeFile(PATH_site.'fileadmin/'.basename($createdFile), file_get_contents($createdFile));
             $this->assertFileExists($createdFile, 'File ' . $createdFile . ' was not created!');
             $this->assertEquals(t3lib_div::trimExplode("\n", $referenceFileContent, TRUE), t3lib_div::trimExplode("\n", file_get_contents($createdFile), TRUE), 'File ' . $createdFile . ' was not equal to original file.');
         }
     }
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:38,代码来源:CompatibilityTest.php


示例16: main

 /**
  * MAIN function for page information display (including hit statistics)
  *
  * @return	string		Output HTML for the module.
  */
 function main()
 {
     global $BACK_PATH, $LANG, $SOBE;
     $dblist = t3lib_div::makeInstance('tx_cms_layout');
     $dblist->descrTable = '_MOD_' . $GLOBALS['MCONF']['name'];
     $dblist->backPath = $BACK_PATH;
     $dblist->thumbs = 0;
     $dblist->script = 'index.php';
     $dblist->showIcon = 0;
     $dblist->setLMargin = 0;
     $dblist->agePrefixes = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears');
     $dblist->pI_showUser = 1;
     $dblist->pI_showStat = 0;
     // PAGES:
     $this->pObj->MOD_SETTINGS['pages_levels'] = $this->pObj->MOD_SETTINGS['depth'];
     // ONLY for the sake of dblist module which uses this value.
     $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
     if ($this->pObj->MOD_SETTINGS['function'] == 'tx_cms_webinfo_hits') {
         $h_func .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[stat_type]', $this->pObj->MOD_SETTINGS['stat_type'], $this->pObj->MOD_MENU['stat_type'], 'index.php');
         if ($this->pObj->MOD_SETTINGS['stat_type'] == 1) {
             $dblist->stat_select_field = 'rl0';
         }
         if ($this->pObj->MOD_SETTINGS['stat_type'] == 2) {
             $dblist->stat_select_field = 'rl1';
         }
         // Timespan
         for ($a = 0; $a < 30; $a++) {
             $dblist->stat_codes[] = 'HITS_days:' . -$a;
         }
         $timespan_b = mktime(0, 0, 0);
         $timespan_e = mktime(0, 0, 0) - (30 - 1) * 3600 * 24 + 1;
         $header = '<br />' . sprintf($LANG->getLL('stat_period'), t3lib_BEfunc::date($timespan_b), t3lib_BEfunc::date($timespan_e)) . '<br />';
         //
         $dblist->start($this->pObj->id, 'pages', 0);
         $dblist->pages_noEditColumns = 1;
         $dblist->generateList();
         $theOutput .= $this->pObj->doc->section($LANG->getLL('hits_title'), t3lib_BEfunc::cshItem($dblist->descrTable, 'stat', $GLOBALS['BACK_PATH'], '|<br />') . $h_func . $header . $dblist->HTMLcode, 0, 1);
     } else {
         $h_func .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages'], 'index.php');
         $dblist->start($this->pObj->id, 'pages', 0);
         $dblist->generateList();
         // CSH
         $theOutput .= $this->pObj->doc->section($LANG->getLL('page_title'), t3lib_BEfunc::cshItem($dblist->descrTable, 'pagetree_overview', $GLOBALS['BACK_PATH'], '|<br />') . $h_func . $dblist->HTMLcode, 0, 1);
         // SYS_NOTES:
         if (t3lib_extMgm::isLoaded('sys_note')) {
             $dblist->start($this->pObj->id, 'sys_note', 0);
             $dblist->generateList();
             if ($dblist->HTMLcode) {
                 $theOutput .= $this->pObj->doc->spacer(10);
                 $theOutput .= $this->pObj->doc->section($LANG->getLL('page_sysnote'), $dblist->HTMLcode, 0, 1);
             }
         }
         // PAGE INFORMATION
         if ($this->pObj->pageinfo['uid']) {
             $theOutput .= $this->pObj->doc->spacer(10);
             $theOutput .= $this->pObj->doc->section($LANG->getLL('pageInformation'), $dblist->getPageInfoBox($this->pObj->pageinfo, $this->pObj->CALC_PERMS & 2), 0, 1);
         }
     }
     return $theOutput;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:65,代码来源:class.tx_cms_webinfo.php


示例17: user_wtcart_clearCart

 /**
  * clear cart
  *
  * @return	void
  */
 public function user_wtcart_clearCart($content = '', $conf = array())
 {
     $div = t3lib_div::makeInstance('tx_wtcart_div');
     // Create new instance for div functions
     $div->removeAllProductsFromSession();
     // clear cart now
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:12,代码来源:user_wtcart_userfuncs.php


示例18: render_wizard

 /**
  * Renders the form in the kickstarter
  *
  * @return    string        wizard
  */
 function render_wizard()
 {
     $lines = array();
     $action = explode(':', $this->wizard->modData['wizAction']);
     if ($action[0] == 'edit') {
         $this->regNewEntry($this->sectionID, $action[1]);
         $lines = $this->catHeaderLines($lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]);
         $piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];
         $ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';
         // Enter title of the static extension template
         $subContent = '<strong>Enter a title for the static extension template:</strong><br />' . $this->renderStringBox($ffPrefix . '[title]', $piConf['title']);
         $lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
         // Enter constants
         $subContent = '<strong>Constants:</strong><br />' . $this->renderTextareaBox($ffPrefix . '[constants]', $piConf['constants']);
         $lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
         // Enter setup
         $subContent = '<strong>Setup:</strong><br />' . $this->renderTextareaBox($ffPrefix . '[setup]', $piConf['setup']);
         $lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';
     }
     /* HOOK: Place a hook here, so additional output can be integrated */
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_ts'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_ts'] as $_funcRef) {
             $lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);
         }
     }
     $content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
     return $content;
 }
开发者ID:jaguerra,项目名称:TYPO3-Kickstarter,代码行数:33,代码来源:class.tx_kickstarter_section_ts.php


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


示例20: getStatus

    /**
     * Compiles a collection of schema version checks against each configured
     * Solr server. Only adds an entry if a schema other than the
     * recommended one was found.
     *
     * @see typo3/sysext/reports/interfaces/tx_reports_StatusProvider::getStatus()
     */
    public function getStatus()
    {
        $reports = array();
        $solrConnections = t3lib_div::makeInstance('tx_solr_ConnectionManager')->getAllConnections();
        foreach ($solrConnections as $solrConnection) {
            if ($solrConnection->ping() && $solrConnection->getSchemaName() != self::RECOMMENDED_SCHEMA_VERSION) {
                $message = '<p style="margin-bottom: 10px;">A schema different
					from the one provided with the extension was detected.</p>
					<p style="margin-bottom: 10px;">It is recommended to use the
					schema.xml file shipping with the Apache Solr for TYPO3
					extension as it provides an optimized field setup for the
					use of Solr with TYPO3. A difference can occur when you
					update the TYPO3 extension, but forget to update the
					schema.xml file on the Solr server. The schema sometimes
					changes to accommodate changes or new features in Apache
					Solr. Also make sure to restart the Tomcat server after
					updating the schema.xml file.</p>
					<p style="margin-bottom: 10px;">Your Solr server is
					currently using a schema named <strong>' . $solrConnection->getSchemaName() . '</strong>, the
					recommended schema is called <strong>' . self::RECOMMENDED_SCHEMA_VERSION . '</strong>. You can
					find the recommended schema.xml file in the extension\'s
					resources folder: EXT:solr/resources/solr/schema.xml. While
					you\'re at it, please check whether you\'re using the
					current solrconfig.xml file, too.</p>';
                $message .= '<p>Affected Solr server:</p>
					<ul>' . '<li>Host: ' . $solrConnection->getHost() . '</li>' . '<li>Port: ' . $solrConnection->getPort() . '</li>' . '<li>Path: ' . $solrConnection->getPath() . '</li>
					</ul>';
                $status = t3lib_div::makeInstance('tx_reports_reports_status_Status', 'Schema Version', 'Unsupported Schema', $message, tx_reports_reports_status_Status::WARNING);
                $reports[] = $status;
            }
        }
        return $reports;
    }
开发者ID:hkremer,项目名称:Publieke-Omroep-Typo3,代码行数:40,代码来源:class.tx_solr_report_schemastatus.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP t3lib_extMgm类代码示例发布时间:2022-05-23
下一篇:
PHP t3lib_BEfunc类代码示例发布时间: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