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


PHP ExtensionManagementUtility::isLoaded方法代码示例

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


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

示例1: init

 /**
  * Initialize, setting what is necessary for browsing pages.
  * Using the current user.
  *
  * @param string $clause Additional clause for selecting pages.
  * @param string $orderByFields record ORDER BY field
  * @return void
  * @todo Define visibility
  */
 public function init($clause = '', $orderByFields = '')
 {
     // This will hide records from display - it has nothing todo with user rights!!
     $clauseExcludePidList = '';
     if ($pidList = $GLOBALS['BE_USER']->getTSConfigVal('options.hideRecords.pages')) {
         if ($pidList = $GLOBALS['TYPO3_DB']->cleanIntList($pidList)) {
             $clauseExcludePidList = ' AND pages.uid NOT IN (' . $pidList . ')';
         }
     }
     // This is very important for making trees of pages: Filtering out deleted pages, pages with no access to and sorting them correctly:
     parent::init(' AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1) . ' ' . $clause . $clauseExcludePidList, 'sorting');
     $this->table = 'pages';
     $this->setTreeName('browsePages');
     $this->domIdPrefix = 'pages';
     $this->iconName = '';
     $this->title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
     $this->MOUNTS = $GLOBALS['WEBMOUNTS'];
     if ($pidList) {
         // Remove mountpoint if explicitly set in options.hideRecords.pages (see above)
         $hideList = explode(',', $pidList);
         $this->MOUNTS = array_diff($this->MOUNTS, $hideList);
     }
     $this->fieldArray = array_merge($this->fieldArray, array('doktype', 'php_tree_stop', 't3ver_id', 't3ver_state', 't3ver_wsid', 't3ver_state', 't3ver_move_id'));
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cms')) {
         $this->fieldArray = array_merge($this->fieldArray, array('hidden', 'starttime', 'endtime', 'fe_group', 'module', 'extendToSubpages', 'is_siteroot', 'nav_hide'));
     }
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:36,代码来源:BrowseTreeView.php

示例2: parseResource

 /**
  *
  */
 public function parseResource()
 {
     $configuration = $this->getConfiguration();
     if (!ExtensionManagementUtility::isLoaded('phpexcel_library')) {
         throw new \Exception('phpexcel_library is not loaded', 12367812368);
     }
     $filename = GeneralUtility::getFileAbsFileName($this->filepath);
     GeneralUtility::makeInstanceService('phpexcel');
     $objReader = \PHPExcel_IOFactory::createReaderForFile($filename);
     $objReader->setReadDataOnly(true);
     $objPHPExcel = $objReader->load($filename);
     if ($configuration['sheet'] >= 0) {
         $objWorksheet = $objPHPExcel->getSheet($configuration['sheet']);
     } else {
         $objWorksheet = $objPHPExcel->getActiveSheet();
     }
     $highestRow = $objWorksheet->getHighestRow();
     $highestColumn = $objWorksheet->getHighestColumn();
     $highestColumnIndex = \PHPExcel_Cell::columnIndexFromString($highestColumn);
     for ($row = 1 + $configuration['skipRows']; $row <= $highestRow; ++$row) {
         $rowRecord = [];
         for ($col = 0; $col <= $highestColumnIndex; ++$col) {
             $rowRecord[] = trim($objWorksheet->getCellByColumnAndRow($col, $row)->getValue());
         }
         $this->content[] = $rowRecord;
     }
 }
开发者ID:sirdiego,项目名称:importr,代码行数:30,代码来源:Excel.php

示例3: init

 /**
  * Initializing global variables
  *
  * @return	void
  */
 function init()
 {
     $this->MCONF = $GLOBALS['MCONF'];
     parent::init();
     // initialize IconFactory
     $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     $temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail');
     if (!is_array($temp['properties'])) {
         $temp['properties'] = array();
     }
     $this->params = $temp['properties'];
     $this->implodedParams = DirectMailUtility::implodeTSParams($this->params);
     if ($this->params['userTable'] && is_array($GLOBALS["TCA"][$this->params['userTable']])) {
         $this->userTable = $this->params['userTable'];
         $this->allowedTables[] = $this->userTable;
     }
     $this->MOD_MENU['dmail_mode'] = BackendUtility::unsetMenuItems($this->params, $this->MOD_MENU['dmail_mode'], 'menu.dmail_mode');
     // initialize backend user language
     if ($this->getLanguageService()->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) {
         $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('sys_language.uid', 'sys_language LEFT JOIN static_languages ON sys_language.static_lang_isocode=static_languages.uid', 'static_languages.lg_typo3=' . $GLOBALS["TYPO3_DB"]->fullQuoteStr($this->getLanguageService()->lang, 'static_languages') . BackendUtility::BEenableFields('sys_language') . BackendUtility::deleteClause('sys_language') . BackendUtility::deleteClause('static_languages'));
         while ($row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res)) {
             $this->sys_language_uid = $row['uid'];
         }
         $GLOBALS["TYPO3_DB"]->sql_free_result($res);
     }
     // load contextual help
     $this->cshTable = '_MOD_' . $this->MCONF['name'];
     if ($GLOBALS["BE_USER"]->uc['edit_showFieldHelp']) {
         $this->getLanguageService()->loadSingleTableDescription($this->cshTable);
     }
 }
开发者ID:Teddytrombone,项目名称:direct_mail,代码行数:36,代码来源:MailerEngine.php

示例4: isValid

 /**
  * Validation method
  *
  * @param mixed $password
  *
  * @return bool
  */
 public function isValid($password)
 {
     $result = true;
     if (!\Evoweb\SfRegister\Services\Login::isLoggedIn()) {
         $this->addError(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('error_changepassword_notloggedin', 'SfRegister'), 1301599489);
         $result = false;
     } else {
         $user = $this->userRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
         if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('saltedpasswords') && \TYPO3\CMS\Saltedpasswords\Utility\SaltedPasswordsUtility::isUsageEnabled('FE')) {
             /** @var \TYPO3\CMS\Saltedpasswords\Salt\SaltInterface $saltedPassword */
             $saltedPassword = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance($user->getPassword(), null);
             if (!$saltedPassword->checkPassword($password, $user->getPassword())) {
                 $this->addError(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('error_changepassword_notequal', 'SfRegister'), 1301599507);
                 $result = false;
             }
         } elseif ($this->settings['encryptPassword'] === 'md5') {
             if (md5($password) !== $user->getPassword()) {
                 $this->addError(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('error_changepassword_notequal', 'SfRegister'), 1301599507);
                 $result = false;
             }
         } elseif ($this->settings['encryptPassword'] === 'sha1') {
             if (sha1($password) !== $user->getPassword()) {
                 $this->addError(\TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('error_changepassword_notequal', 'SfRegister'), 1301599507);
                 $result = false;
             }
         }
     }
     return $result;
 }
开发者ID:electricretina,项目名称:sf_register,代码行数:36,代码来源:EqualCurrentPasswordValidator.php

示例5: synchronizeUsers

 /**
  * Synchronizes backend users.
  *
  * @param array $users
  */
 protected function synchronizeUsers(array $users)
 {
     /** @var \TYPO3\CMS\Saltedpasswords\Salt\SaltInterface $instance */
     $instance = null;
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('saltedpasswords')) {
         $instance = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance(null, 'BE');
     }
     $authorizedKeys = array_flip(array('username', 'admin', 'disable', 'realName', 'email', 'TSconfig', 'starttime', 'endtime', 'lang', 'tx_openid_openid', 'deleted'));
     foreach ($users as $user) {
         $user = array_intersect_key($user, $authorizedKeys);
         if (empty($this->config['synchronizeDeletedAccounts']) || !$this->config['synchronizeDeletedAccounts']) {
             if (isset($user['deleted']) && $user['deleted']) {
                 // We do not authorize deleted user accounts to be synchronized
                 // on this website
                 continue;
             }
         } else {
             $user['deleted'] = $user['deleted'] ? 1 : 0;
         }
         // Generate a random password
         $password = GeneralUtility::generateRandomBytes(16);
         $user['password'] = $instance ? $instance->getHashedPassword($password) : md5($password);
         $localUser = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('uid', 'be_users', 'username=' . $this->getDatabaseConnection()->fullQuoteStr($user['username'], 'be_users'));
         if ($localUser) {
             // Update existing user
             $this->getDatabaseConnection()->exec_UPDATEquery('be_users', 'uid=' . $localUser['uid'], $user);
         } else {
             // Create new user
             $this->getDatabaseConnection()->exec_INSERTquery('be_users', $user);
         }
     }
 }
开发者ID:sruegg,项目名称:t3ext-causal_accounts,代码行数:37,代码来源:SynchronizationTask.php

示例6: initializeActionMethodValidators

 /**
  * initializeActionMethodValidators to dynamically add validators
  *
  * @return void
  */
 public function initializeActionMethodValidators()
 {
     parent::initializeActionMethodValidators();
     $requestArguments = $this->request->getArguments();
     foreach ($this->arguments as $argument) {
         /* @var  \TYPO3\CMS\Extbase\MVC\Controller\Argument $argument */
         if ($argument->getName() == 'newComment' && $this->actionMethodName == 'createAction') {
             // Get the validators of the model
             /* @var \TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator $validator */
             $validator = $argument->getValidator();
             // If activated and available add the modified sr_freecap validator
             if ($this->settings['captcha'] == 'sr_freecap' && ExtensionManagementUtility::isLoaded('sr_freecap')) {
                 $options = array('word' => $requestArguments['newComment']['captchaResponse']);
                 /** @var \Heilmann\JhPwcommentsCaptcha\Validation\Validator\SrFreecapValidator  $captchaValidator */
                 $captchaValidator = GeneralUtility::makeInstance('Heilmann\\JhPwcommentsCaptcha\\Validation\\Validator\\SrFreecapValidator', $options);
                 $validator->addValidator($captchaValidator);
             }
             // If activated and available add the modified captcha_viewhelper validator
             // It seems that EXT:captcha_viewhelper is not maintained anymore. Support will be dropped two minor versions later
             if ($this->settings['captcha'] == 'captcha' && ExtensionManagementUtility::isLoaded('captcha_viewhelper')) {
                 $options = array('value' => $requestArguments['newComment']['captchaResponse']);
                 /** @var \Heilmann\JhPwcommentsCaptcha\Validation\Validator\CaptchaValidator  $captchaValidator */
                 $captchaValidator = GeneralUtility::makeInstance('Heilmann\\JhPwcommentsCaptcha\\Validation\\Validator\\CaptchaValidator', $options);
                 $validator->addValidator($captchaValidator);
             }
         }
     }
 }
开发者ID:jonathanheilmann,项目名称:ext-jh_pwcomments_captcha,代码行数:33,代码来源:CaptchaController.php

示例7: isDbalEnabled

 /**
  * Return TRUE if dbal and adodb extension is loaded
  *
  * @return bool TRUE if dbal and adodb is loaded
  */
 protected function isDbalEnabled()
 {
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('adodb') && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dbal')) {
         return true;
     }
     return false;
 }
开发者ID:dachcom-digital,项目名称:TYPO3.CMS,代码行数:12,代码来源:DatabaseCharsetUpdate.php

示例8: initialize

 /**
  * Initializes settings for the admin panel.
  *
  * @return void
  */
 public function initialize()
 {
     $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     $this->saveConfigOptions();
     $typoScriptFrontend = $this->getTypoScriptFrontendController();
     // Setting some values based on the admin panel
     $this->extFeEditLoaded = ExtensionManagementUtility::isLoaded('feedit');
     $typoScriptFrontend->forceTemplateParsing = $this->extGetFeAdminValue('tsdebug', 'forceTemplateParsing');
     $typoScriptFrontend->displayEditIcons = $this->extGetFeAdminValue('edit', 'displayIcons');
     $typoScriptFrontend->displayFieldEditIcons = $this->extGetFeAdminValue('edit', 'displayFieldIcons');
     if (GeneralUtility::_GP('ADMCMD_editIcons')) {
         $typoScriptFrontend->displayFieldEditIcons = 1;
     }
     if (GeneralUtility::_GP('ADMCMD_simUser')) {
         $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateUserGroup'] = (int) GeneralUtility::_GP('ADMCMD_simUser');
         $this->ext_forcePreview = true;
     }
     if (GeneralUtility::_GP('ADMCMD_simTime')) {
         $this->getBackendUser()->uc['TSFE_adminConfig']['preview_simulateDate'] = (int) GeneralUtility::_GP('ADMCMD_simTime');
         $this->ext_forcePreview = true;
     }
     if ($typoScriptFrontend->forceTemplateParsing) {
         $typoScriptFrontend->set_no_cache('Admin Panel: Force template parsing', true);
     } elseif ($this->extFeEditLoaded && $typoScriptFrontend->displayEditIcons) {
         $typoScriptFrontend->set_no_cache('Admin Panel: Display edit icons', true);
     } elseif ($this->extFeEditLoaded && $typoScriptFrontend->displayFieldEditIcons) {
         $typoScriptFrontend->set_no_cache('Admin Panel: Display field edit icons', true);
     } elseif (GeneralUtility::_GP('ADMCMD_view')) {
         $typoScriptFrontend->set_no_cache('Admin Panel: Display preview', true);
     }
 }
开发者ID:,项目名称:,代码行数:36,代码来源:

示例9: getSystemLanguages

 /**
  * Returns array of system languages
  *
  * Since TYPO3 4.5 the flagIcon is not returned as a filename in "gfx/flags/*" anymore,
  * but as a string <flags-xx>. The calling party should call
  * t3lib_iconWorks::getSpriteIcon(<flags-xx>) to get an HTML which will represent
  * the flag of this language.
  *
  * @param integer $page_id Page id (only used to get TSconfig configuration setting flag and label for default language)
  * @param string $backPath Backpath for flags
  * @return array Array with languages (title, uid, flagIcon)
  * @todo Define visibility
  */
 public function getSystemLanguages($page_id = 0, $backPath = '')
 {
     $modSharedTSconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($page_id, 'mod.SHARED');
     $languageIconTitles = array();
     // fallback "old iconstyles"
     if (preg_match('/\\.gif$/', $modSharedTSconfig['properties']['defaultLanguageFlag'])) {
         $modSharedTSconfig['properties']['defaultLanguageFlag'] = str_replace('.gif', '', $modSharedTSconfig['properties']['defaultLanguageFlag']);
     }
     $languageIconTitles[0] = array('uid' => 0, 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage') . ')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'), 'ISOcode' => 'DEF', 'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) ? 'flags-' . $modSharedTSconfig['properties']['defaultLanguageFlag'] : 'empty-empty');
     // Set "All" language:
     $languageIconTitles[-1] = array('uid' => -1, 'title' => $GLOBALS['LANG']->getLL('multipleLanguages'), 'ISOcode' => 'DEF', 'flagIcon' => 'flags-multiple');
     // Find all system languages:
     $sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_language', '');
     foreach ($sys_languages as $row) {
         $languageIconTitles[$row['uid']] = $row;
         if ($row['static_lang_isocode'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
             $staticLangRow = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
             if ($staticLangRow['lg_iso_2']) {
                 $languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
             }
         }
         if (strlen($row['flag'])) {
             $languageIconTitles[$row['uid']]['flagIcon'] = \TYPO3\CMS\Backend\Utility\IconUtility::mapRecordTypeToSpriteIconName('sys_language', $row);
         }
     }
     return $languageIconTitles;
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:40,代码来源:TranslationConfigurationProvider.php

示例10: evaluateCondition

 /**
  * This method decides if the condition is TRUE or FALSE. It can be overriden in extending viewhelpers
  * to adjust functionality.
  *
  * @param array $arguments ViewHelper arguments to evaluate the condition for this ViewHelper, allows for
  *                         flexiblity in overriding this method.
  * @return bool
  */
 protected static function evaluateCondition($arguments = null)
 {
     $extensionName = $arguments['extensionName'];
     $extensionKey = GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName);
     $isLoaded = ExtensionManagementUtility::isLoaded($extensionKey);
     return true === $isLoaded;
 }
开发者ID:fluidtypo3,项目名称:vhs,代码行数:15,代码来源:LoadedViewHelper.php

示例11: initialize

 /**
  * Override the initialize method to load all available
  * countries before rendering
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
         if ($this->hasArgument('allowedCountries') && count($this->arguments['allowedCountries'])) {
             $result = $this->countryRepository->findByIsoCodeA2($this->arguments['allowedCountries']);
         } else {
             $result = $this->countryRepository->findAll();
         }
         if (!empty($this->arguments['allowedCountries'])) {
             $orderedResults = array();
             foreach ($this->arguments['allowedCountries'] as $countryKey) {
                 foreach ($result as $country) {
                     if ($country->getIsoCodeA2() == $countryKey) {
                         $orderedResults[] = $country;
                     }
                 }
             }
             $result = $orderedResults;
         }
         $this->arguments['options'] = array();
         foreach ($result as $country) {
             $this->arguments['options'][] = $country;
         }
     }
 }
开发者ID:evoWeb,项目名称:store_finder,代码行数:32,代码来源:SelectCountriesViewHelper.php

示例12: user_rgsg

 public function user_rgsg($content, $conf)
 {
     $sysPageObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
     $rootLine = $sysPageObj->getRootLine($GLOBALS['TSFE']->id);
     $TSObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
     $TSObj->tt_track = 0;
     $TSObj->init();
     $TSObj->runThroughTemplates($rootLine);
     $TSObj->generateConfig();
     $this->conf = $TSObj->setup['plugin.']['tx_rgsmoothgallery_pi1.'];
     $split = strpos($GLOBALS['TSFE']->currentRecord, ':');
     $id = substr($GLOBALS['TSFE']->currentRecord, $split + 1);
     $where = 'uid =' . $id;
     $table = 'tt_content';
     $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('imagewidth,imageheight', $table, $where, $groupBy = '', $orderBy, $limit = '');
     $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
     $css .= $row['imagewidth'] ? 'width:' . $row['imagewidth'] . 'px;' : '';
     $css .= $row['imageheight'] ? 'height:' . $row['imageheight'] . 'px;' : '';
     $GLOBALS['TSFE']->additionalCSS['rgsmoothgallery' . $id] = '#myGallery' . $id . ' {' . $css . '}';
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3mootools')) {
         require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('t3mootools') . 'class.tx_t3mootools.php';
     }
     if (defined('T3MOOTOOLS')) {
         tx_t3mootools::addMooJS();
     } else {
         $header .= $this->getPath($this->conf['pathToMootools']) ? '<script src="' . $this->getPath($this->conf['pathToMootools']) . '" type="text/javascript"></script>' : '';
         $header .= $this->getPath($this->conf['pathToMootoolsMore']) ? '<script src="' . $this->getPath($this->conf['pathToMootoolsMore']) . '" type="text/javascript"></script>' : '';
     }
     // path to js + css
     $GLOBALS['TSFE']->additionalHeaderData['rgsmoothgallery'] = $header . '
     <script src="' . $this->getPath($this->conf['pathToJdgalleryJS']) . '" type="text/javascript"></script>
     <link rel="stylesheet" href="' . $this->getPath($this->conf['pathToJdgalleryCSS']) . '" type="text/css" media="screen" />
   ';
     return $content;
 }
开发者ID:joekolade,项目名称:rgsmoothgallery,代码行数:35,代码来源:class.tx_rgsmoothgallery_rgsg.php

示例13: prepareLoader

 /**
  * Get all the complex data for the loader.
  * This return value will be cached and stored in the database
  * There is no file monitoring for this cache
  *
  * @param Loader $loader
  * @param int    $type
  *
  * @return array
  */
 public function prepareLoader(Loader $loader, $type)
 {
     $grids = [];
     if (!ExtensionManagementUtility::isLoaded('gridelements')) {
         return $grids;
     }
     $commandPath = ExtensionManagementUtility::extPath($loader->getExtensionKey()) . 'Resources/Private/Grids/';
     $files = FileUtility::getBaseFilesWithExtensionInDir($commandPath, 'ts,txt');
     foreach ($files as $file) {
         $pathInfo = PathUtility::pathinfo($file);
         $iconPath = 'EXT:' . $loader->getExtensionKey() . '/Resources/Public/Icons/Grids/' . $pathInfo['filename'] . '.';
         $extension = IconUtility::getIconFileExtension(GeneralUtility::getFileAbsFileName($iconPath));
         $translationKey = 'grid.' . $pathInfo['filename'];
         if ($type === LoaderInterface::EXT_TABLES) {
             TranslateUtility::assureLabel($translationKey, $loader->getExtensionKey(), $pathInfo['filename']);
         }
         $path = 'EXT:' . $loader->getExtensionKey() . '/Resources/Private/Grids/' . $file;
         $icon = $extension ? $iconPath . $extension : false;
         $label = TranslateUtility::getLllString($translationKey, $loader->getExtensionKey());
         $content = GeneralUtility::getUrl(GeneralUtility::getFileAbsFileName($path));
         $flexForm = 'EXT:' . $loader->getExtensionKey() . '/Configuration/FlexForms/Grids/' . $pathInfo['filename'] . '.xml';
         $flexFormFile = GeneralUtility::getFileAbsFileName($flexForm);
         $flexFormContent = is_file($flexFormFile) ? GeneralUtility::getUrl($flexFormFile) : false;
         $grids[] = $this->getPageTsConfig($pathInfo['filename'], $label, $content, $icon, $flexFormContent);
     }
     return $grids;
 }
开发者ID:c2po,项目名称:autoloader,代码行数:37,代码来源:Gridelement.php

示例14: while

 /**
  * Get the localization of the select field items (right-hand part of form)
  * Referenced by TCA
  *
  * @param	array $params Array of searched translation
  *
  * @return	void
  */
 function get_localized_categories(array $params)
 {
     global $LANG;
     /*
     		$params['items'] = &$items;
     		$params['config'] = $config;
     		$params['TSconfig'] = $iArray;
     		$params['table'] = $table;
     		$params['row'] = $row;
     		$params['field'] = $field;
     */
     $config = $params['config'];
     $table = $config['itemsProcFunc_config']['table'];
     // initialize backend user language
     if ($LANG->lang && ExtensionManagementUtility::isLoaded('static_info_tables')) {
         $sysPage = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
         $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_language.uid', 'sys_language LEFT JOIN static_languages ON sys_language.static_lang_isocode = static_languages.uid', 'static_languages.lg_typo3 = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($LANG->lang, 'static_languages') . $sysPage->enableFields('sys_language') . $sysPage->enableFields('static_languages'));
         while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
             $this->sys_language_uid = $row['uid'];
             $this->collate_locale = $row['lg_collate_locale'];
         }
         $GLOBALS['TYPO3_DB']->sql_free_result($res);
     }
     if (is_array($params['items']) && !empty($params['items'])) {
         foreach ($params['items'] as $k => $item) {
             $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid=' . intval($item[1]));
             while ($rowCat = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                 if ($localizedRowCat = DirectMailUtility::getRecordOverlay($table, $rowCat, $this->sys_language_uid, '')) {
                     $params['items'][$k][0] = $localizedRowCat['category'];
                 }
             }
             $GLOBALS['TYPO3_DB']->sql_free_result($res);
         }
     }
 }
开发者ID:Teddytrombone,项目名称:direct_mail,代码行数:43,代码来源:SelectCategories.php

示例15: getRecords

 /**
  * Get the Records
  *
  * @param integer                                        $startPage
  * @param array                                          $basePages
  * @param Tx_GoogleServices_Controller_SitemapController $obj
  *
  * @throws Exception
  * @return Tx_GoogleServices_Domain_Model_Node
  */
 public function getRecords($startPage, $basePages, Tx_GoogleServices_Controller_SitemapController $obj)
 {
     $nodes = array();
     if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('tt_news')) {
         return $nodes;
     }
     if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($GLOBALS['TSFE']->tmpl->setup['plugin.']['tt_news.']['singlePid'])) {
         throw new Exception('You have to set tt_news singlePid.');
     }
     $singlePid = intval($GLOBALS['TSFE']->tmpl->setup['plugin.']['tt_news.']['singlePid']);
     $news = $this->getRecordsByField('tt_news', 'pid', implode(',', $basePages));
     foreach ($news as $record) {
         // Alternative Single PID
         $alternativeSinglePid = $this->alternativeSinglePid($record['uid']);
         $linkPid = $alternativeSinglePid ? $alternativeSinglePid : $singlePid;
         // Build URL
         $url = $obj->getUriBuilder()->setArguments(array('tx_ttnews' => array('tt_news' => $record['uid'])))->setTargetPageUid($linkPid)->build();
         // can't generate a valid url
         if (!strlen($url)) {
             continue;
         }
         // Build Node
         $node = new Tx_GoogleServices_Domain_Model_Node();
         $node->setLoc($url);
         $node->setPriority($this->getPriority($record));
         $node->setChangefreq('monthly');
         $node->setLastmod($this->getModifiedDate($record));
         $nodes[] = $node;
     }
     return $nodes;
 }
开发者ID:sirdiego,项目名称:google_services,代码行数:41,代码来源:News.php


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