本文整理汇总了PHP中t3lib_div::getUserObj方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::getUserObj方法的具体用法?PHP t3lib_div::getUserObj怎么用?PHP t3lib_div::getUserObj使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_div
的用法示例。
在下文中一共展示了t3lib_div::getUserObj方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* constructor
*
* @param TYPO3backend TYPO3 backend object reference
*/
public function __construct(TYPO3backend &$backendReference = null)
{
$this->backendReference = $backendReference;
$this->cacheActions = array();
$this->optionValues = array('all', 'pages');
// Clear cache for ALL tables!
if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.all')) {
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_all', true);
$this->cacheActions[] = array('id' => 'all', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=all', 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-high'));
}
// Clear cache for either ALL pages
if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.pages')) {
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_pages', true);
$this->cacheActions[] = array('id' => 'pages', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=pages', 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-medium'));
}
// Clearing of cache-files in typo3conf/ + menu
if ($GLOBALS['BE_USER']->isAdmin() && $GLOBALS['TYPO3_CONF_VARS']['EXT']['extCache']) {
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCacheMenu_allTypo3Conf', true);
$this->cacheActions[] = array('id' => 'temp_CACHED', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=temp_CACHED', 'icon' => t3lib_iconWorks::getSpriteIcon('actions-system-cache-clear-impact-low'));
}
// hook for manipulate cacheActions
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'] as $cacheAction) {
$hookObject = t3lib_div::getUserObj($cacheAction);
if (!$hookObject instanceof backend_cacheActionsHook) {
throw new UnexpectedValueException('$hookObject must implement interface backend_cacheActionsHook', 1228262000);
}
$hookObject->manipulateCacheActions($this->cacheActions, $this->optionValues);
}
}
}
示例2: 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;
}
示例3: initialize
/**
* Initializes this object
*
* @param tx_kesearch_lib $pObj
* @return void
*/
public function initialize(tx_kesearch_lib $pObj)
{
$this->pObj = $pObj;
$this->cObj = $pObj->cObj;
if (TYPO3_VERSION_INTEGER >= 6002000) {
$this->db = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_kesearch_db');
} else {
$this->db = t3lib_div::makeInstance('tx_kesearch_db');
}
$this->conf = $this->pObj->conf;
$this->piVars = $this->pObj->piVars;
$this->startingPoints = $this->pObj->startingPoints;
$this->tagChar = $this->pObj->extConf['prePostTagChar'];
// get filters and filter options
$this->filters = $this->getFiltersFromUidList($this->combineLists($this->conf['filters'], $this->conf['hiddenfilters']));
// hook to modify filters
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyFilters'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['modifyFilters'] as $_classRef) {
if (TYPO3_VERSION_INTEGER >= 7000000) {
$_procObj =& TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
} else {
$_procObj =& t3lib_div::getUserObj($_classRef);
}
$_procObj->modifyFilters($this->filters, $this);
}
}
// get list of selected filter options (via frontend or backend)
foreach ($this->filters as $filter) {
$this->filters[$filter['uid']]['selectedOptions'] = $this->getSelectedFilterOptions($filter);
}
}
示例4: main
/**
* Main function, rendering the element browser in RTE mode.
*
* @return void
*/
function main()
{
// Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$altMountPoints = t3lib_div::trimExplode(',', $altMountPoints);
foreach ($altMountPoints as $filePathRelativeToFileadmindir) {
$GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 'readonly');
}
$GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts();
}
// Rendering type by user function
$browserRendered = false;
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'] as $classRef) {
$browserRenderObj = t3lib_div::getUserObj($classRef);
if (is_object($browserRenderObj) && method_exists($browserRenderObj, 'isValid') && method_exists($browserRenderObj, 'render')) {
if ($browserRenderObj->isValid($this->mode, $this)) {
$this->content .= $browserRenderObj->render($this->mode, $this);
$browserRendered = true;
break;
}
}
}
}
// If type was not rendered, use default rendering functions
if (!$browserRendered) {
$GLOBALS['SOBE']->browser = t3lib_div::makeInstance('tx_rtehtmlarea_select_image');
$GLOBALS['SOBE']->browser->init();
$modData = $GLOBALS['BE_USER']->getModuleData('select_image.php', 'ses');
list($modData, $store) = $GLOBALS['SOBE']->browser->processSessionData($modData);
$GLOBALS['BE_USER']->pushModuleData('select_image.php', $modData);
$this->content = $GLOBALS['SOBE']->browser->main_rte();
}
}
示例5: main
public function main($content, $conf)
{
$pibaseObj = t3lib_div::getUserObj('&tx_srfeuserregister_pi1_base');
$pibaseObj->cObj = $this->cObj;
$content = $pibaseObj->main($content, $conf);
return $content;
}
示例6: getStorage
/**
* Obtains a storage. This function will return a non-abstract class, which
* is derieved from the tx_rsaauth_abstract_storage. Applications should
* not use anoy methods that are not declared in the tx_rsaauth_abstract_storage.
*
* @return tx_rsaauth_abstract_storage A storage
*/
public static function getStorage()
{
if (is_null(self::$storageInstance)) {
self::$storageInstance = t3lib_div::getUserObj(self::$preferredStorage);
}
return self::$storageInstance;
}
示例7: __construct
/**
* Fill hookObjectsArr with different link types and possible XClasses.
*/
public function __construct()
{
// Hook to handle own checks
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $key => $classRef) {
$this->hookObjectsArr[$key] =& t3lib_div::getUserObj($classRef);
}
}
}
示例8: customMediaParams
/**
* Load extra predefined media params if they exist
*
* @param array $params: Existing types by reference
* @param array $conf: config array
*/
public function customMediaParams(&$params, $conf)
{
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaParams'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaParams'] as $classRef) {
$hookObj = t3lib_div::getUserObj($classRef);
$hookObj->customMediaParams($params, $conf);
}
}
}
示例9: init
function init($conf)
{
$this->conf = $conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
$this->pi_initPIflexForm();
// Init FlexForm configuration for plugin
$this->hooks = array();
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ods_domaincheck']['tx_odsdomaincheck_pi1'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ods_domaincheck']['tx_odsdomaincheck_pi1'] as $classRef) {
$this->hooks[] =& t3lib_div::getUserObj($classRef);
}
}
/* --------------------------------------------------
Configuration (order of priority)
- FlexForm
- TypoScript
-------------------------------------------------- */
$flex = array();
$options = array('tlds', 'show_form', 'show_default', 'page_buy', 'buy_params', 'page_transfer', 'transfer_params', 'template');
foreach ($options as $option) {
$value = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], $option, 'sDEF');
switch ($option) {
case 'template':
if ($value) {
$flex[$option] = 'uploads/tx_odsdomaincheck/' . $value;
}
break;
case 'tlds':
if ($value) {
$tlds2 = array();
$tlds = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,tld', 'tx_odsdomaincheck_tlds', 'uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($value) . ')', '', '', '', 'uid');
foreach (explode(',', $value) as $tld) {
$tlds2[] = $tlds[$tld]['tld'];
}
$flex[$option] = implode(',', $tlds2);
}
break;
default:
if ($value) {
$flex[$option] = $value;
}
break;
}
}
$this->config = array_merge($conf, $flex);
$this->tlds = explode(',', $this->config['tlds']);
// Hook to manipulate init
foreach ($this->hooks as $hook) {
if (method_exists($hook, 'afterInit')) {
$hook->afterInit($this);
}
}
}
示例10: __construct
/**
* The __constructor is private because the dispatcher is a singleton
*
* @param void
* @return void
*/
protected function __construct()
{
$this->observers = array();
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['crawler/domain/events/class.tx_crawler_domain_events_dispatcher.php']['registerObservers'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['crawler/domain/events/class.tx_crawler_domain_events_dispatcher.php']['registerObservers'] as $classRef) {
$hookObj =& t3lib_div::getUserObj($classRef);
if (method_exists($hookObj, 'registerObservers')) {
$hookObj->registerObservers($this);
}
}
}
}
示例11: getViews
/**
* Get defined views for dropdown (from hook)
* @return array
*/
public function getViews($config, $item)
{
$optionList = array();
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['jfmulticontent']['getViews'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['jfmulticontent']['getViews'] as $_classRef) {
$_procObj =& t3lib_div::getUserObj($_classRef);
if (!method_exists($_procObj, 'isActive') || method_exists($_procObj, 'isActive') && $_procObj->isActive()) {
$optionList[] = array(trim($_procObj->getname()), trim($_procObj->getIdentifier()));
}
}
}
$config['items'] = array_merge($config['items'], $optionList);
return $config;
}
示例12: fillIndexerConfig
public function fillIndexerConfig(&$params, $pObj)
{
// hook for custom registration of further indexerConfigurations
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerIndexerConfiguration'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['ke_search']['registerIndexerConfiguration'] as $_classRef) {
if (TYPO3_VERSION_INTEGER >= 7000000) {
$_procObj =& TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
} else {
$_procObj =& t3lib_div::getUserObj($_classRef);
}
$_procObj->registerIndexerConfiguration($params, $pObj);
}
}
}
示例13: execute
/**
* Provides the values for the markers in the simple form template
*
* @return array An array containing values for markers in the simple form template
* @throws InvalidArgumentException if an registered form modifier fails to implement the required interface Tx_Solr_FormModifier
*/
public function execute()
{
$url = $this->cObj->getTypoLink_URL($this->parentPlugin->conf['search.']['targetPage']);
$marker = array('action' => htmlspecialchars($url), 'action_id' => intval($this->parentPlugin->conf['search.']['targetPage']), 'action_language' => intval($GLOBALS['TSFE']->sys_page->sys_language_uid), 'action_language_parameter' => 'L', 'accept-charset' => $GLOBALS['TSFE']->metaCharset, 'q' => $this->parentPlugin->getCleanUserQuery());
// hook to modify the search form
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifySearchForm'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifySearchForm'] as $classReference) {
$formModifier = t3lib_div::getUserObj($classReference);
if ($formModifier instanceof Tx_Solr_FormModifier) {
if ($formModifier instanceof Tx_Solr_CommandPluginAware) {
$formModifier->setParentPlugin($this->parentPlugin);
}
$marker = $formModifier->modifyForm($marker, $this->parentPlugin->getTemplate());
} else {
throw new InvalidArgumentException('Form modifier "' . $classReference . '" must implement the Tx_Solr_FormModifier interface.', 1262864703);
}
}
}
return $marker;
}
示例14: getBackend
/**
* Obtains a backend. This function will return a non-abstract class, which
* is derieved from the tx_rsaauth_abstract_backend. Applications should
* not use anoy methods that are not declared in the tx_rsaauth_abstract_backend.
*
* @return tx_rsaauth_abstract_backend A backend
*/
public static function getBackend()
{
if (!self::$initialized) {
// Backend does not exist yet. Create it.
foreach (self::$availableBackends as $backend) {
$backendObject = t3lib_div::getUserObj($backend);
// Check that it is derieved from the proper base class
if ($backendObject instanceof tx_rsaauth_abstract_backend) {
/* @var $backendObject tx_rsaauth_abstract_backend */
if ($backendObject->isAvailable()) {
// The backend is available, save it and stop the loop
self::$selectedBackend = $backendObject;
self::$initialized = true;
break;
}
// Attempt to force destruction of the object
unset($backend);
}
}
}
return self::$selectedBackend;
}
示例15: saveTranslation
/**
* Save the translation
*
* @param tx_l10nmgr_l10nConfiguration $l10ncfgObj
* @param tx_l10nmgr_translationData $translationObj
* @return void
*/
function saveTranslation(tx_l10nmgr_l10nConfiguration $l10ncfgObj, tx_l10nmgr_translationData $translationObj)
{
// Provide a hook for specific manipulations before saving
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['l10nmgr']['savePreProcess'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['l10nmgr']['savePreProcess'] as $classReference) {
$processingObject = t3lib_div::getUserObj($classReference);
$processingObject->processBeforeSaving($l10ncfgObj, $translationObj, $this);
}
}
$sysLang = $translationObj->getLanguage();
$accumObj = $l10ncfgObj->getL10nAccumulatedInformationsObjectForLanguage($sysLang);
$flexFormDiffArray = $this->_submitContentAndGetFlexFormDiff($accumObj->getInfoArray($sysLang), $translationObj->getTranslationData());
if ($flexFormDiffArray !== FALSE) {
$l10ncfgObj->updateFlexFormDiff($sysLang, $flexFormDiffArray);
}
// Provide a hook for specific manipulations after saving
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['l10nmgr']['savePostProcess'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['l10nmgr']['savePostProcess'] as $classReference) {
$processingObject = t3lib_div::getUserObj($classReference);
$processingObject->processAfterSaving($l10ncfgObj, $translationObj, $flexFormDiffArray, $this);
}
}
}