本文整理汇总了PHP中t3lib_extMgm类的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_extMgm类的具体用法?PHP t3lib_extMgm怎么用?PHP t3lib_extMgm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了t3lib_extMgm类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:32,代码来源:StandaloneView.php
示例2: proc
/**
* Processing the wizard items array
*
* @param array $wizardItems: The wizard items
* @return Modified array with wizard items
*/
function proc($wizardItems)
{
global $LANG;
$LL = $this->includeLocalLang();
$wizardItems['plugins_tx_rggooglemap_pi1'] = array('icon' => t3lib_extMgm::extRelPath('rggooglemap') . 'pi1/ce_wiz.png', 'title' => $LANG->getLLL('pi1_title', $LL), 'description' => $LANG->getLLL('pi1_plus_wiz_description', $LL), 'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=rggooglemap_pi1');
return $wizardItems;
}
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:13,代码来源:class.tx_rggooglemap_pi1_wizicon.php
示例3: initialize
/**
* Initializes the Module
*
* @return void
*/
public function initialize()
{
parent::init();
$this->doc = t3lib_div::makeInstance('template');
$this->doc->setModuleTemplate(t3lib_extMgm::extPath('recycler') . 'mod1/mod_template.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setExtDirectStateProvider();
$this->pageRenderer = $this->doc->getPageRenderer();
$this->relativePath = t3lib_extMgm::extRelPath('recycler');
$this->pageRecord = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
//don't access in workspace
if ($GLOBALS['BE_USER']->workspace !== 0) {
$this->isAccessibleForCurrentUser = false;
}
//read configuration
$modTS = $GLOBALS['BE_USER']->getTSConfig('mod.recycler');
if ($this->isCurrentUserAdmin()) {
$this->allowDelete = true;
} else {
$this->allowDelete = $modTS['properties']['allowDelete'] == '1';
}
if (isset($modTS['properties']['recordsPageLimit']) && intval($modTS['properties']['recordsPageLimit']) > 0) {
$this->recordsPageLimit = intval($modTS['properties']['recordsPageLimit']);
}
}
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:index.php
示例4: 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';
}
}
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:12,代码来源:class.tx_srfeuserregister_storage_security.php
示例5: 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;
}
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:37,代码来源:class.ext_update.php
示例6: veranstaltungBuchen
public function veranstaltungBuchen(&$piBase, $pid, $eventId, $eventDateId)
{
$GLOBALS['TSFE']->additionalHeaderData['hetools'] .= '
<link rel="stylesheet" type="text/css" href="' . t3lib_extMgm::siteRelPath('fe_management') . 'res/femanagement.css"/>
<link rel="stylesheet" type="text/css" href="' . t3lib_extMgm::siteRelPath('he_tools') . 'res/technolino.css"/>
';
/** @var $terminModel tx_femanagement_model_events */
$terminModel = t3lib_div::makeInstance('tx_femanagement_model_events', $piBase, $pid);
$eventData = $terminModel->getEventData($eventId);
$out = '<h1>' . $eventData['title'] . '</h1>' . '<h2>Thema: ' . $eventData['subtitle'] . '</h2>';
$out .= '<form class="technolino" method="POST" action="">';
$out .= $this->getInputField('organization', 'Name Ihrer Einrichtung');
$out .= $this->getInputField('first_name', 'Vorname');
$out .= $this->getInputField('last_name', 'Nachname');
$out .= $this->getInputField('street', 'Straße/Hausnummer');
$out .= $this->getInputField('zip', 'Plz');
$out .= $this->getInputField('city', 'Ort');
$out .= $this->getInputField('email', 'E-Mail-Adresse');
$out .= $this->getInputField('phone', 'Tel.');
$out .= $this->getTextareaField('remarks', 'Bemerkungen', false);
$out .= '<div id="buttons" class="field">
<input type="submit" name="anmelden" value="Verbindlich anmelden" />
</div>';
$out .= '</form>';
return $out;
}
开发者ID:mmirsch,项目名称:he_tools1,代码行数:26,代码来源:class.tx_he_tools_technolino.php
示例7: 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;
}
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:35,代码来源:class.t3lib_transl8tools.php
示例8: main
/**
* Main function, returning the HTML content of the module
*
* @return string HTML
*/
function main() {
require_once(t3lib_extMgm::extPath(STATIC_INFO_TABLES_EXTkey).'class.tx_staticinfotables_encoding.php');
$tableArray = array ('static_countries', 'static_country_zones', 'static_languages', 'static_currencies');
$content = '';
$content.= '<br />Convert character encoding of the static info tables.';
$content.= '<br />The default encoding is UTF-8.';
$destEncoding = htmlspecialchars(t3lib_div::_GP('dest_encoding'));
if(t3lib_div::_GP('convert') AND ($destEncoding != '')) {
foreach ($tableArray as $table) {
$content .= '<p>'.htmlspecialchars($table.' > '.$destEncoding).'</p>';
tx_staticinfotables_encoding::convertEncodingTable($table, 'utf-8', $destEncoding);
}
$content .= '<p>You must enter the charset \''.$destEncoding.'\' now manually in the EM for static_info_tables!</p>';
$content .= '<p>Done</p>';
} else {
$content .= '<form name="static_info_tables_form" action="'.htmlspecialchars(t3lib_div::linkThisScript()).'" method="post">';
$linkScript = t3lib_div::slashJS(t3lib_div::linkThisScript());
$content .= '<br /><br />';
$content .= 'This conversion works only once. When you converted the tables and you want to do it again to another encoding you have to reinstall the tables with the Extension Manager or select \'UPDATE!\'.';
$content .= '<br /><br />';
$content .= 'Destination character encoding:';
$content .= '<br />'.tx_staticinfotables_encoding::getEncodingSelect('dest_encoding', '', '', $TYPO3_CONF_VARS['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset']);
$content .= '<br /><br />';
$content .= '<input type="submit" name="convert" value="Convert" onclick="this.form.action=\''.$linkScript.'\';submit();" />';
$content .= '</form>';
}
return $content;
}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:39,代码来源:class.ext_update.php
示例9: 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;
}
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:29,代码来源:class.tx_srfeuserregister_freecap.php
示例10: tx_kickstarter_wizard
/**
* Constructor
*/
function tx_kickstarter_wizard()
{
$this->modData = t3lib_div::_POST($this->varPrefix);
$version = class_exists('t3lib_utility_VersionNumber') ? t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_version) : t3lib_div::int_from_ver(TYPO3_version);
if ($version < 4006000) {
$LOCAL_LANG = t3lib_div::readLLXMLfile(t3lib_extMgm::extPath('setup') . '/mod/locallang.xml', 'default');
// Getting the available languages
$theLanguages = t3lib_div::trimExplode('|', TYPO3_languages);
} else {
/** @var $xliffParser t3lib_l10n_parser_Xliff */
$xliffParser = t3lib_div::makeInstance('t3lib_l10n_parser_Xliff');
$LOCAL_LANG = $xliffParser->getParsedData(t3lib_extMgm::extPath('setup') . '/mod/locallang.xlf', 'default');
/** @var $locales t3lib_l10n_Locales */
$locales = t3lib_div::makeInstance('t3lib_l10n_Locales');
// Getting the available languages
$theLanguages = $locales->getLocales();
}
foreach ($theLanguages as $val) {
if ($val !== 'default') {
if ($version < 4006000) {
$localLabel = htmlspecialchars($LOCAL_LANG['default']['lang_' . $val]);
} else {
$localLabel = htmlspecialchars($LOCAL_LANG['default']['lang_' . $val][0]['target']);
}
$this->languages[$val] = $localLabel;
}
}
asort($this->languages);
// init reserved words
$resWords = t3lib_div::makeInstance('tx_kickstarter_reservedWords');
$this->reservedWords = $resWords->getReservedWords();
}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:35,代码来源:class.tx_kickstarter_wizard.php
示例11: getEntry
/**
* Renders entry for one page of the current document.
*
* @access protected
*
* @param integer $number: The page to render
* @param string $template: Parsed template subpart
*
* @return string The rendered entry ready for output
*/
protected function getEntry($number, $template)
{
// Set current page if applicable.
if (!empty($this->piVars['page']) && $this->piVars['page'] == $number) {
$markerArray['###STATE###'] = 'cur';
} else {
$markerArray['###STATE###'] = 'no';
}
// Set page number.
$markerArray['###NUMBER###'] = $number;
// Set pagination.
$markerArray['###PAGINATION###'] = $this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['label'];
// Get thumbnail or placeholder.
if (!empty($this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['files'][$this->conf['fileGrpThumbs']])) {
$thumbnailFile = $this->doc->getFileLocation($this->doc->physicalPagesInfo[$this->doc->physicalPages[$number]]['files'][$this->conf['fileGrpThumbs']]);
} elseif (!empty($this->conf['placeholder'])) {
$thumbnailFile = $GLOBALS['TSFE']->tmpl->getFileName($this->conf['placeholder']);
} else {
$thumbnailFile = t3lib_extMgm::siteRelPath($this->extKey) . 'plugins/pagegrid/placeholder.jpg';
}
$thumbnail = '<img alt="' . $markerArray['###PAGINATION###'] . '" src="' . $thumbnailFile . '" />';
// Get new plugin variables for typolink.
$piVars = $this->piVars;
// Unset no longer needed plugin variables.
// unset($piVars['pagegrid']) is for DFG Viewer compatibility!
unset($piVars['pointer'], $piVars['DATA'], $piVars['pagegrid']);
$piVars['page'] = $number;
$linkConf = array('useCacheHash' => 1, 'parameter' => $this->conf['targetPid'], 'additionalParams' => t3lib_div::implodeArrayForUrl($this->prefixId, $piVars, '', TRUE, FALSE), 'title' => $markerArray['###PAGINATION###']);
$markerArray['###THUMBNAIL###'] = $this->cObj->typoLink($thumbnail, $linkConf);
return $this->cObj->substituteMarkerArray($template, $markerArray);
}
开发者ID:CalanthaC,项目名称:goobi-presentation,代码行数:41,代码来源:class.tx_dlf_pagegrid.php
示例12: getMapCore
public function getMapCore($backpath = '')
{
$path = ($backpath ? $backpath : $GLOBALS['TSFE']->absRefPrefix) . t3lib_extMgm::siteRelPath('ods_osm') . 'res/';
$path = $this->config['local_js'] ? $path . 'OpenLayers3/' : 'http://ol3js.org/en/master/';
$GLOBALS['TSFE']->getPageRenderer()->addCssFile($path . 'css/ol.css');
$this->scripts = array($path . 'build/ol.js');
}
开发者ID:fabianlipp,项目名称:ods_osm,代码行数:7,代码来源:class.tx_odsosm_openlayers3.php
示例13: execute
/**
* @return void
*/
public function execute()
{
$contexts = array('BE', 'FE');
if ($this->getExtensionKey()) {
$extensionList = array($this->getExtensionKey());
} else {
$extensionList = Tx_Smoothmigration_Utility_ExtensionUtility::getLoadedExtensionsFiltered();
}
foreach ($contexts as $context) {
if (is_array($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) && count($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS']) > 0) {
foreach ($GLOBALS['TYPO3_CONF_VARS'][$context]['XCLASS'] as $targetClass => $implementationClass) {
if (is_file($implementationClass)) {
$path = str_replace(PATH_typo3conf . 'ext/', '', $implementationClass);
$extKey = current(explode('/', $path));
} else {
$extKey = t3lib_extMgm::getExtensionKeyByPrefix(strtolower($implementationClass));
}
if (!in_array($extKey, $extensionList)) {
continue;
}
$this->issues[] = $this->createIssue($context, $targetClass, $implementationClass, $extKey);
}
}
}
}
开发者ID:pitscribble,项目名称:typo3-upgradereport,代码行数:28,代码来源:Processor.php
示例14: 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
示例15: 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;
}
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:33,代码来源:DamViewHelper.php
示例16: loadConfig4BE
/**
* Lädt ein COnfigurations Objekt nach mit der TS aus der Extension
* Dabei wird alles geholt was in "plugin.tx_$extKey", "lib.$extKey." und
* "lib.links." liegt
*
* @param string $extKey Extension, deren TS Config geladen werden soll
* @param string $extKeyTS Extension, deren Konfig innerhalb der
* TS Config geladen werden soll.
* Es kann also zb. das TS von mklib geladen werden aber darin die konfig für
* das plugin von mkxyz
* @param string $sStaticPath pfad zum TS
* @param array $aConfig zusätzliche Konfig, die die default überschreibt
* @param boolean $resolveReferences sollen referenzen die in lib.
* und plugin.tx_$extKeyTS stehen aufgelöst werden?
* @param boolean $forceTsfePreparation
* @return tx_rnbase_configurations
*/
public static function loadConfig4BE($extKey, $extKeyTs = null, $sStaticPath = '', $aConfig = array(), $resolveReferences = false, $forceTsfePreparation = false)
{
$extKeyTs = is_null($extKeyTs) ? $extKey : $extKeyTs;
if (!$sStaticPath) {
$sStaticPath = '/static/ts/setup.txt';
}
if (file_exists(t3lib_div::getFileAbsFileName('EXT:' . $extKey . $sStaticPath))) {
t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extKey . $sStaticPath . '">');
}
tx_rnbase::load('tx_rnbase_configurations');
tx_rnbase::load('tx_rnbase_util_Misc');
$tsfePreparationOptions = array();
if ($forceTsfePreparation) {
$tsfePreparationOptions['force'] = true;
}
// Ist bei Aufruf aus BE notwendig! (@TODO: sicher???)
tx_rnbase_util_Misc::prepareTSFE($tsfePreparationOptions);
$GLOBALS['TSFE']->config = array();
$cObj = t3lib_div::makeInstance('tslib_cObj');
$pageTsConfig = self::getPagesTSconfig(0);
$tempConfig = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
$tempConfig['lib.'][$extKeyTs . '.'] = $pageTsConfig['lib.'][$extKeyTs . '.'];
$tempConfig['lib.']['links.'] = $pageTsConfig['lib.']['links.'];
if ($resolveReferences) {
$GLOBALS['TSFE']->tmpl->setup['lib.'][$extKeyTs . '.'] = $tempConfig['lib.'][$extKeyTs . '.'];
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_' . $extKeyTs . '.'] = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
}
$pageTsConfig = $tempConfig;
$qualifier = $pageTsConfig['qualifier'] ? $pageTsConfig['qualifier'] : $extKeyTs;
// möglichkeit die default konfig zu überschreiben
$pageTsConfig = t3lib_div::array_merge_recursive_overrule($pageTsConfig, $aConfig);
$configurations = new tx_rnbase_configurations();
$configurations->init($pageTsConfig, $cObj, $extKeyTs, $qualifier);
return $configurations;
}
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:52,代码来源:class.tx_mklib_util_TS.php
示例17: 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;
}
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:32,代码来源:class.tx_dbal_handler_openoffice.php
示例18: initialize_editor
function initialize_editor($pageId, $template_uid = 0)
{
// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
global $tmpl, $tplRow, $theConstants;
$tmpl = t3lib_div::makeInstance("t3lib_tsparser_ext");
// Defined global here!
$tmpl->tt_track = 0;
// Do not log time-performance information
$tmpl->init();
$tmpl->ext_localGfxPrefix = t3lib_extMgm::extPath("tstemplate_ceditor");
$tmpl->ext_localWebGfxPrefix = $GLOBALS["BACK_PATH"] . t3lib_extMgm::extRelPath("tstemplate_ceditor");
$tplRow = $tmpl->ext_getFirstTemplate($pageId, $template_uid);
// Get the row of the first VISIBLE template of the page. whereclause like the frontend.
if (is_array($tplRow)) {
// IF there was a template...
// Gets the rootLine
$sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
$rootLine = $sys_page->getRootLine($pageId);
$tmpl->runThroughTemplates($rootLine, $template_uid);
// This generates the constants/config + hierarchy info for the template.
$theConstants = $tmpl->generateConfig_constants();
// The editable constants are returned in an array.
$tmpl->ext_categorizeEditableConstants($theConstants);
// The returned constants are sorted in categories, that goes into the $tmpl->categories array
$tmpl->ext_regObjectPositions($tplRow["constants"]);
// This array will contain key=[expanded constantname], value=linenumber in template. (after edit_divider, if any)
return 1;
}
}
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:29,代码来源:class.tx_tstemplateceditor.php
示例19: loginFormHook
/**
* Hooks to the felogin extension to provide additional code for FE login
*
* @return array 0 => onSubmit function, 1 => extra fields and required files
*/
public function loginFormHook()
{
$result = array(0 => '', 1 => '');
if ($GLOBALS['TYPO3_CONF_VARS']['FE']['loginSecurityLevel'] == 'rsa') {
$backend = tx_rsaauth_backendfactory::getBackend();
if ($backend) {
$result[0] = 'tx_rsaauth_feencrypt(this);';
$javascriptPath = t3lib_extMgm::siteRelPath('rsaauth') . 'resources/';
$files = array('jsbn/jsbn.js', 'jsbn/prng4.js', 'jsbn/rng.js', 'jsbn/rsa.js', 'jsbn/base64.js', 'rsaauth_min.js');
foreach ($files as $file) {
$result[1] .= '<script type="text/javascript" src="' . t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $javascriptPath . $file . '"></script>';
}
// Generate a new key pair
$keyPair = $backend->createNewKeyPair();
// Save private key
$storage = tx_rsaauth_storagefactory::getStorage();
/* @var $storage tx_rsaauth_abstract_storage */
$storage->put($keyPair->getPrivateKey());
// Add RSA hidden fields
$result[1] .= '<input type="hidden" id="rsa_n" name="n" value="' . htmlspecialchars($keyPair->getPublicKeyModulus()) . '" />';
$result[1] .= '<input type="hidden" id="rsa_e" name="e" value="' . sprintf('%x', $keyPair->getExponent()) . '" />';
}
}
return $result;
}
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:30,代码来源:class.tx_rsaauth_feloginhook.php
示例20: 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
注:本文中的t3lib_extMgm类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论