本文整理汇总了PHP中t3lib_extMgm::isLoaded方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_extMgm::isLoaded方法的具体用法?PHP t3lib_extMgm::isLoaded怎么用?PHP t3lib_extMgm::isLoaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_extMgm
的用法示例。
在下文中一共展示了t3lib_extMgm::isLoaded方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @param tslib_cObj $contentObject The current cObject. If NULL a new instance will be created
*/
public function __construct(tslib_cObj $contentObject = NULL)
{
if (!t3lib_extMgm::isLoaded('extbase')) {
return 'In the current version you still need to have Extbase installed in order to use the Fluid Standalone view!';
}
$this->initializeAutoloader();
$this->objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
$configurationManager = $this->objectManager->get('Tx_Extbase_Configuration_ConfigurationManagerInterface');
if ($contentObject === NULL) {
$contentObject = t3lib_div::makeInstance('tslib_cObj');
}
$configurationManager->setContentObject($contentObject);
$this->templateParser = $this->objectManager->get('Tx_Fluid_Core_Parser_TemplateParser');
$this->setRenderingContext($this->objectManager->create('Tx_Fluid_Core_Rendering_RenderingContext'));
$request = $this->objectManager->create('Tx_Extbase_MVC_Web_Request');
$request->setRequestURI(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'));
$request->setBaseURI(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
$uriBuilder = $this->objectManager->create('Tx_Extbase_MVC_Web_Routing_UriBuilder');
$uriBuilder->setRequest($request);
$controllerContext = $this->objectManager->create('Tx_Extbase_MVC_Controller_ControllerContext');
$controllerContext->setRequest($request);
$controllerContext->setUriBuilder($uriBuilder);
$flashMessageContainer = $this->objectManager->get('Tx_Extbase_MVC_Controller_FlashMessages');
// singleton
$controllerContext->setFlashMessageContainer($flashMessageContainer);
$this->setControllerContext($controllerContext);
}
示例2: get_localized_categories
/**
* 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 ...
*/
public function get_localized_categories($params)
{
/*
$params['items'] = &$items;
$params['config'] = $config;
$params['TSconfig'] = $iArray;
$params['table'] = $table;
$params['row'] = $row;
$params['field'] = $field;
*/
$items = $params['items'];
$config = $params['config'];
$table = $config['itemsProcFunc_config']['table'];
// initialize backend user language
if ($GLOBALS['LANG']->lang && t3lib_extMgm::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($GLOBALS['LANG']->lang, 'static_languages') . t3lib_pageSelect::enableFields('sys_language') . t3lib_pageSelect::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'];
}
}
if (is_array($params['items'])) {
reset($params['items']);
while (list($k, $item) = each($params['items'])) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid=' . intval($item[1]));
while ($rowCat = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$localizedRowCat = tx_srfeuserregister_dmstatic::getRecordOverlay($table, $rowCat, $this->sys_language_uid, '');
if ($localizedRowCat) {
$params['items'][$k][0] = $localizedRowCat['category'];
}
}
}
}
}
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:41,代码来源:class.tx_srfeuserregister_select_dmcategories.php
示例3: init
/**
* Initialize handler
*
* @param array Configuration from DBAL
* @param object Parent object
* @return boolean True on success.
*/
function init($config, $pObj)
{
$this->config = $config['config'];
if (t3lib_extMgm::isLoaded('libunzipped')) {
// Include Unzip library:
require_once t3lib_extMgm::extPath('libunzipped') . 'class.tx_libunzipped.php';
// Find database file:
$sxc_file = t3lib_div::getFileAbsFileName($this->config['sxc_file']);
if (@is_file($sxc_file)) {
// Initialize Unzip object:
$this->unzip = t3lib_div::makeInstance('tx_libunzipped');
$this->spreadSheetFiles = $this->unzip->init($sxc_file);
if (is_array($this->spreadSheetFiles)) {
return TRUE;
} else {
$this->errorStatus = 'Spreadsheet could not be unzipped...?';
}
} else {
$this->errorStatus = 'The Spreadsheet file "' . $sxc_file . '" was not found!';
}
} else {
$this->errorStatus = 'This data handler needs the extension "tx_libunzipped" to be installed!';
}
return FALSE;
}
示例4: user_rgsg
public function user_rgsg($content, $conf)
{
$sysPageObj = t3lib_div::makeInstance('t3lib_pageSelect');
$rootLine = $sysPageObj->getRootLine($GLOBALS['TSFE']->id);
$TSObj = t3lib_div::makeInstance('t3lib_tsparser_ext');
$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 (t3lib_extMgm::isLoaded('t3mootools')) {
require_once t3lib_extMgm::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;
}
示例5: render
/**
* Return dam record
*
* @param integer $uid uid of media element.
* @param string $as name of element which is used for the dam record
* @return string
* @throws Tx_Fluid_Core_ViewHelper_Exception
*/
public function render($uid, $as)
{
if (!t3lib_extMgm::isLoaded('dam')) {
throw new Tx_Fluid_Core_ViewHelper_Exception('DamViewHelper needs a loaded DAM extension', 1318786684);
}
if ($GLOBALS['TSFE']->sys_language_content > 0) {
$media = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', 'tx_news_domain_model_media', 'deleted=0 AND uid =' . $uid);
$media = $GLOBALS['TSFE']->sys_page->getRecordOverlay('tx_news_domain_model_media', $media, $GLOBALS['TSFE']->sys_language_content);
if ($media['_LOCALIZED_UID'] > 0) {
// Does this localized media has dam record?
$where = 'uid_foreign =' . (int) $media['_LOCALIZED_UID'] . ' AND tablenames =\'tx_news_domain_model_media\' AND ident = \'tx_news_media\'';
$damRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid_local', 'tx_dam_mm_ref', $where);
if (is_array($damRec) && $damRec['uid_local']) {
$uid = $media['_LOCALIZED_UID'];
}
}
}
$res = tx_dam_db::referencesQuery('tx_dam', '', 'tx_news_domain_model_media', (int) $uid, $mmIdent = '', $mmTable = 'tx_dam_mm_ref', $fields = 'tx_dam.*');
$record = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
$this->templateVariableContainer->add($as, $record);
$output = $this->renderChildren();
$this->templateVariableContainer->remove($as);
return $output;
}
示例6: main
/**
* Main function, returning the HTML content of the module
*
* @return string HTML
*/
function main()
{
$content = '';
$content .= '<br />Update the Static Info Tables with new language labels.';
$content .= '<br />';
if (t3lib_div::_GP('import')) {
$destEncoding = t3lib_div::_GP('dest_encoding');
$extPath = t3lib_extMgm::extPath('static_info_tables_it');
$fileContent = explode("\n", t3lib_div::getUrl($extPath . 'ext_tables_static_update.sql'));
foreach ($fileContent as $line) {
if ($line = trim($line) and preg_match('#^UPDATE#i', $line)) {
$query = $this->getUpdateEncoded($line, $destEncoding);
$res = $GLOBALS['TYPO3_DB']->admin_query($query);
}
}
$content .= '<br />';
$content .= '<p>Encoding: ' . htmlspecialchars($destEncoding) . '</p>';
$content .= '<p>Done.</p>';
} elseif (t3lib_extMgm::isLoaded('static_info_tables_it')) {
$content .= '</form>';
$content .= '<form action="' . htmlspecialchars(t3lib_div::linkThisScript()) . '" method="post">';
$content .= '<br />Destination character encoding:';
$content .= '<br />' . tx_staticinfotables_encoding::getEncodingSelect('dest_encoding', '', 'utf-8');
$content .= '<br />(The character encoding must match the encoding of the existing tables data. By default this is UTF-8.)';
$content .= '<br /><br />';
$content .= '<input type="submit" name="import" value="Import" />';
$content .= '</form>';
} else {
$content .= '<br /><strong>The extension needs to be installed first!</strong>';
}
return $content;
}
示例7: synchronizeUsers
/**
* Synchronizes backend users.
*
* @param array $users
*/
protected function synchronizeUsers(array $users)
{
/** @var $instance tx_saltedpasswords_salts */
$instance = null;
if (t3lib_extMgm::isLoaded('saltedpasswords')) {
$instance = tx_saltedpasswords_salts_factory::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 = t3lib_div::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,代码来源:class.tx_causalaccounts_synchronizationtask.php
示例8: setStorageSecurityLevel
/**
* Sets the storage security level
*
* @return void
*/
protected function setStorageSecurityLevel()
{
$this->storageSecurityLevel = 'normal';
if (t3lib_extMgm::isLoaded('saltedpasswords') && tx_saltedpasswords_div::isUsageEnabled('FE')) {
$this->storageSecurityLevel = 'salted';
}
}
示例9: execute
/**
* Activates DBAL if it is supported.
*
* @param tx_install $instObj
* @return void
*/
public function execute(tx_install $instObj)
{
if ($instObj->mode == '123') {
switch ($instObj->step) {
case 1:
if (!t3lib_extMgm::isLoaded('dbal') && $this->isDbalSupported()) {
$this->activateDbal();
// Reload page to have Install Tool actually load DBAL
$redirectUrl = t3lib_div::getIndpEnv('TYPO3_REQUEST_URL');
t3lib_utility_Http::redirect($redirectUrl);
}
break;
case 2:
if (!t3lib_extMgm::isLoaded('dbal') && $this->isDbalSupported()) {
$this->activateDbal();
}
break;
case 3:
$driver = $instObj->INSTALL['localconf.php']['typo_db_driver'];
if ($driver === 'mysql') {
$this->deactivateDbal();
}
break;
}
}
}
示例10: getSystemLanguages
/**
* Returns array of system languages
* @param integer page id (only used to get TSconfig configuration setting flag and label for default language)
* @param string Backpath for flags
* @return array
*/
function getSystemLanguages($page_id = 0, $backPath = '')
{
global $TCA, $LANG;
// Icons and language titles:
t3lib_div::loadTCA('sys_language');
$flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
$flagIconPath = $backPath . '../' . substr($flagAbsPath, strlen(PATH_site));
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($page_id, 'mod.SHARED');
$languageIconTitles = array();
// Set default:
$languageIconTitles[0] = array('uid' => 0, 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $LANG->getLL('defaultLanguage') . ')' : $LANG->getLL('defaultLanguage'), 'ISOcode' => 'DEF', 'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath . $modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath . $modSharedTSconfig['properties']['defaultLanguageFlag'] : null);
// Set "All" language:
$languageIconTitles[-1] = array('uid' => -1, 'title' => $LANG->getLL('multipleLanguages'), 'ISOcode' => 'DEF', 'flagIcon' => $flagIconPath . 'multi-language.gif');
// 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'] && t3lib_extMgm::isLoaded('static_info_tables')) {
$staticLangRow = t3lib_BEfunc::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'] = @is_file($flagAbsPath . $row['flag']) ? $flagIconPath . $row['flag'] : '';
}
}
return $languageIconTitles;
}
示例11: evalValues
/**
* Evaluates the captcha word
*/
public function evalValues($theTable, $dataArray, $origArray, $markContentArray, $cmdKey, $requiredArray, $theField, $cmdParts, $bInternal, &$test, $dataObject)
{
$errorField = '';
// Must be set to FALSE if it is not a test
$test = FALSE;
if (trim($cmdParts[0]) == 'freecap' && t3lib_extMgm::isLoaded('sr_freecap') && isset($dataArray[$theField])) {
$freeCap = t3lib_div::getUserObj('&tx_srfreecap_pi2');
if (isset($GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['sr_freecap_EidDispatcher'])) {
$sessionNameSpace = 'tx_srfreecap';
} else {
// Old version of sr_freecap
$sessionNameSpace = 'tx_' . $freeCap->extKey;
}
// Save the sr_freecap word_hash
// sr_freecap will invalidate the word_hash after calling checkWord
$sessionData = $GLOBALS['TSFE']->fe_user->getKey('ses', $sessionNameSpace);
if (!$freeCap->checkWord($dataArray[$theField])) {
$errorField = $theField;
} else {
// Restore sr_freecap word_hash
$GLOBALS['TSFE']->fe_user->setKey('ses', $sessionNameSpace, $sessionData);
$GLOBALS['TSFE']->storeSessionData();
}
}
return $errorField;
}
示例12: pmDrawItem
/**
* Draw the item in the page module
*
* @param array parameters
* @param object the parent object
* @return string
*/
public function pmDrawItem($params, $pObj)
{
if ($this->extKey != '' && t3lib_extMgm::isLoaded($this->extKey) && in_array(intval($pObj->pageRecord['doktype']), array(1, 2, 5)) && $params['row']['pi_flexform'] != '') {
tx_div2007_ff::load($params['row']['pi_flexform'], $this->extKey);
$codes = 'CODE: ' . tx_div2007_ff::get($this->extKey, 'display_mode');
}
return $codes;
}
示例13: checkAccess
/**
* checks whether the user has access to this toolbar item
*
* @see typo3/alt_shortcut.php
* @return boolean true if user has access, false if not
*/
public function checkAccess()
{
if (t3lib_extMgm::isLoaded('version')) {
$MCONF = array();
include 'mod/user/ws/conf.php';
return $GLOBALS['BE_USER']->modAccess(array('name' => 'user', 'access' => 'user,group'), false) && $GLOBALS['BE_USER']->modAccess($MCONF, false);
}
return FALSE;
}
示例14: assertFluid
private function assertFluid()
{
if (!t3lib_extMgm::isLoaded("extbase")) {
$this->oForm->mayday("<b>renderer:FLUID</b> needs the extension <b>extbase</b> to be loaded.");
}
if (!t3lib_extMgm::isLoaded("fluid")) {
$this->oForm->mayday("<b>renderer:FLUID</b> needs the extension <b>fluid</b> to be loaded.");
}
}
示例15: __construct
/**
* Construcor of this object
*/
public function __construct($pObj)
{
parent::__construct($pObj);
if (TYPO3_VERSION_INTEGER < 6002000) {
$this->templavoilaIsLoaded = t3lib_extMgm::isLoaded('templavoila');
} else {
$this->templavoilaIsLoaded = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('templavoila');
}
if ($this->templavoilaIsLoaded) {
if (TYPO3_VERSION_INTEGER >= 7000000) {
$enableFields = TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('pages') . TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages');
} else {
$enableFields = t3lib_BEfunc::BEenableFields('pages') . t3lib_BEfunc::deleteClause('pages');
}
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid,title', 'pages', 'pid = 0' . $enableFields);
$GLOBALS['TT'] = new t3lib_timeTrackNull();
if (TYPO3_VERSION_INTEGER >= 6002000) {
$GLOBALS['TSFE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tslib_fe', $GLOBALS['TYPO3_CONF_VARS'], $row['uid'], 0);
$GLOBALS['TSFE']->sys_page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('t3lib_pageSelect');
} else {
$GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe', $GLOBALS['TYPO3_CONF_VARS'], $row['uid'], 0);
$GLOBALS['TSFE']->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
}
$GLOBALS['TSFE']->sys_page->init(TRUE);
$GLOBALS['TSFE']->initTemplate();
// Filling the config-array, first with the main "config." part
if (is_array($GLOBALS['TSFE']->tmpl->setup['config.'])) {
$GLOBALS['TSFE']->config['config'] = $GLOBALS['TSFE']->tmpl->setup['config.'];
}
// override it with the page/type-specific "config."
if (is_array($GLOBALS['TSFE']->pSetup['config.'])) {
if (TYPO3_VERSION_INTEGER >= 7000000) {
$GLOBALS['TSFE']->config['config'] = TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($GLOBALS['TSFE']->config['config'], $GLOBALS['TSFE']->pSetup['config.']);
} else {
$GLOBALS['TSFE']->config['config'] = t3lib_div::array_merge_recursive_overrule($GLOBALS['TSFE']->config['config'], $GLOBALS['TSFE']->pSetup['config.']);
}
}
// generate basic rootline
$GLOBALS['TSFE']->rootLine = array(0 => array('uid' => $row['uid'], 'title' => $row['title']));
if (TYPO3_VERSION_INTEGER >= 6002000) {
$this->tv = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_templavoila_pi1');
} else {
$this->tv = t3lib_div::makeInstance('tx_templavoila_pi1');
}
}
$this->counter = 0;
foreach ($this->indexCTypes as $value) {
$cTypes[] = 'CType="' . $value . '"';
}
$this->whereClauseForCType = implode(' OR ', $cTypes);
// get all available sys_language_uid records
if (TYPO3_VERSION_INTEGER >= 7000000) {
$this->sysLanguages = TYPO3\CMS\Backend\Utility\BackendUtility::getSystemLanguages();
} else {
$this->sysLanguages = t3lib_BEfunc::getSystemLanguages();
}
}