作者:khanhdeu
项目:typo3tes
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
*/
public function menuConfig()
{
$this->MOD_MENU = array('mode' => array());
$this->MOD_MENU['mode']['information'] = $GLOBALS['LANG']->sL('LLL:EXT:taskcenter/locallang.xlf:task_overview');
$this->MOD_MENU['mode']['tasks'] = 'Tasks';
parent::menuConfig();
}
作者:Teddytrombon
项目:direct_mai
/**
* First initialization of global variables
*
* @return void
*/
function init()
{
$this->MCONF = $GLOBALS['MCONF'];
parent::init();
// initialize IconFactory
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
// get TS Params
$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);
$this->MOD_MENU['dmail_mode'] = BackendUtility::unsetMenuItems($this->params, $this->MOD_MENU['dmail_mode'], 'menu.dmail_mode');
// initialize the page selector
$this->sys_page = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
$this->sys_page->init(true);
// 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'];
}
}
// load contextual help
$this->cshTable = '_MOD_' . $this->MCONF['name'];
if ($GLOBALS["BE_USER"]->uc['edit_showFieldHelp']) {
$this->getLanguageService()->loadSingleTableDescription($this->cshTable);
}
}
作者:danilov
项目:l10nmg
/**
* Initializes the Module
*
* @return void
*/
public function init()
{
$this->MCONF['name'] = 'web_txl10nmgrM1';
$GLOBALS['BE_USER']->modAccess($this->MCONF, 1);
$GLOBALS['LANG']->includeLLFile("EXT:l10nmgr/Resources/Private/Language/Modules/Module1/locallang.xlf");
parent::init();
}
作者:khanhdeu
项目:typo3tes
/**
* Initializes the Module
*
* @return void
*/
public function initialize()
{
parent::init();
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('recycler') . 'mod1/mod_template.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setExtDirectStateProvider();
$this->pageRenderer = $this->doc->getPageRenderer();
$this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('recycler');
$this->pageRecord = BackendUtility::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']) && (int) $modTS['properties']['recordsPageLimit'] > 0) {
$this->recordsPageLimit = (int) $modTS['properties']['recordsPageLimit'];
}
}
作者:preinbot
项目:direct_mai
/**
* Initializing global variables
*
* @return void no return values: first initialisation of global variables
*/
function init()
{
$this->MCONF = $GLOBALS['MCONF'];
parent::init();
$temp = BackendUtility::getModTSconfig($this->id, 'mod.web_modules.dmail');
$this->params = $temp['properties'];
$this->implodedParams = BackendUtility::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 ($GLOBALS["LANG"]->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($GLOBALS["LANG"]->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']) {
$GLOBALS["LANG"]->loadSingleTableDescription($this->cshTable);
}
}
作者:noxlud
项目:TYPO3v4-Cor
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
* @todo Define visibility
*/
public function menuConfig()
{
$this->MOD_MENU = array('function' => array('1' => $GLOBALS['LANG']->getLL('display')));
if ($GLOBALS['BE_USER']->user['admin']) {
$this->MOD_MENU['function']['2'] = $GLOBALS['LANG']->getLL('rebuild');
}
parent::menuConfig();
}
作者:mhueb
项目:formhandle
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
*/
function menuConfig()
{
$this->MOD_MENU = array('function' => array('1' => $GLOBALS['LANG']->getLL('function1')));
if (intval($this->settings['enableClearLogs']) === 1 || $GLOBALS['BE_USER']->user['admin']) {
$this->MOD_MENU['function']['2'] = $GLOBALS['LANG']->getLL('function2');
}
parent::menuConfig();
}
作者:samuweis
项目:TYPO3-Sit
/**
* Init
*
* @return void
* @todo Define visibility
*/
public function init()
{
parent::init();
$this->id = (int) GeneralUtility::_GP('id');
$this->e = GeneralUtility::_GP('e');
$this->sObj = GeneralUtility::_GP('sObj');
$this->edit = GeneralUtility::_GP('edit');
$this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
}
作者:viso
项目:ext-rs_userim
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
*/
function menuConfig()
{
$this->MOD_MENU = array("function" => array("1" => $GLOBALS['LANG']->getLL("function1"), "2" => $GLOBALS['LANG']->getLL("function2"), "3" => $GLOBALS['LANG']->getLL("function3")));
if (!$this->getBackendUserAuthentication()->isAdmin()) {
// Rollback and Security settings are not available for non-admins
unset($this->MOD_MENU['function']['2']);
unset($this->MOD_MENU['function']['3']);
}
parent::menuConfig();
}
作者:nicksergi
项目:TYPO3v4-Cor
/**
* Init
*
* @return void
* @todo Define visibility
*/
public function init()
{
parent::init();
$this->id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'));
$this->e = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('e');
$this->sObj = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('sObj');
$this->edit = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('edit');
$this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('clear_all_cache')) {
$this->include_once[] = PATH_t3lib . 'class.t3lib_tcemain.php';
}
}
作者:TYPO3Incubato
项目:TYPO3.CM
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
*/
public function menuConfig()
{
$this->MOD_MENU = array('mode' => array());
$this->MOD_MENU['mode']['information'] = $this->getLanguageService()->sL('LLL:EXT:taskcenter/Resources/Private/Language/locallang.xlf:task_overview');
$this->MOD_MENU['mode']['tasks'] = $this->getLanguageService()->sL('LLL:EXT:taskcenter/Resources/Private/Language/locallang.xlf:task_tasks');
/* Copied from parent::menuConfig, because parent is hardcoded to menu.function,
* however menu.function is already used for the individual tasks.
* Therefore we use menu.mode here.
*/
// Page/be_user TSconfig settings and blinding of menu-items
$this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.' . $this->moduleName);
$this->MOD_MENU['mode'] = $this->mergeExternalItems($this->MCONF['name'], 'mode', $this->MOD_MENU['mode']);
$this->MOD_MENU['mode'] = BackendUtility::unsetMenuItems($this->modTSconfig['properties'], $this->MOD_MENU['mode'], 'menu.mode');
parent::menuConfig();
}
作者:Teddytrombon
项目:direct_mai
/**
* First initialization of global variables
*
* @return void
*/
function init()
{
$this->MCONF = $GLOBALS['MCONF'];
parent::init();
// initialize IconFactory
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
// get the config from pageTS
$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;
}
// check if the right domain shoud be set
if (!$this->params['use_domain']) {
$rootLine = BackendUtility::BEgetRootLine($this->id);
if ($rootLine) {
$parts = parse_url(GeneralUtility::getIndpEnv('TYPO3_SITE_URL'));
if (BackendUtility::getDomainStartPage($parts['host'], $parts['path'])) {
$temporaryPreUrl = BackendUtility::firstDomainRecord($rootLine);
$domain = BackendUtility::getRecordsByField('sys_domain', 'domainName', $temporaryPreUrl, ' AND hidden=0', '', 'sorting');
if (is_array($domain)) {
reset($domain);
$dom = current($domain);
$this->params['use_domain'] = $dom['uid'];
}
}
}
}
$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);
}
}
作者:ulrikkol
项目:ca
/**
* Adds items to the ->MOD_MENU array.
* Used for the function menu selector.
*/
function menuConfig()
{
$this->MOD_MENU = array('function' => array('1' => $GLOBALS['LANG']->getLL('function1'), '2' => $GLOBALS['LANG']->getLL('function2')));
parent::menuConfig();
}
作者:noxlud
项目:TYPO3v4-Cor
/**
* If $this->function_key is set (which means there are two levels of object connectivity) then $this->extClassConf is loaded with the TBE_MODULES_EXT configuration for that sub-sub-module
*
* @return void
* @see $function_key, tx_funcwizards_webfunc::init()
* @todo Define visibility
*/
public function handleExternalFunctionValue()
{
// Must clean first to make sure the correct key is set...
$this->pObj->MOD_SETTINGS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleData($this->pObj->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->pObj->MCONF['name']);
if ($this->function_key) {
$this->extClassConf = $this->pObj->getExternalItemConfig($this->pObj->MCONF['name'], $this->function_key, $this->pObj->MOD_SETTINGS[$this->function_key]);
if (is_array($this->extClassConf) && $this->extClassConf['path']) {
$this->pObj->include_once[] = $this->extClassConf['path'];
}
}
}
作者:TrueTyp
项目:caretake
/**
* Initializes the Module
* @return void
*/
function init()
{
global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
parent::init();
$this->node_id = $_GET['id'];
}
作者:rabe6
项目:mm_foru
/**
*
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
* NEW: The menu is built from the TSConfig now. This makes is easier for
* other extensions to add own menu items to this menu.
*
* @return void
*
*/
function menuConfig()
{
global $LANG;
/** @var $LANG \TYPO3\CMS\Lang\LanguageService */
$items = array();
foreach ($this->modTSconfig['properties']['sections.'] as $k => $v) {
if ($v === 'MMFORUM_SECTION_ITEM') {
$c = $this->modTSconfig['properties']['sections.'][$k . '.'];
$items["{$k}"] = $c['name'] ? $LANG->sL($c['name'], 1) : $LANG->get('menu.' . $c['id']);
}
}
$this->MOD_MENU = array('function' => $items);
parent::menuConfig();
}
作者:dachcom-digita
项目:TYPO3.CM
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
*/
public function menuConfig()
{
$this->MOD_MENU = array('function' => array('scheduler' => $this->getLanguageService()->getLL('function.scheduler'), 'check' => $this->getLanguageService()->getLL('function.check'), 'info' => $this->getLanguageService()->getLL('function.info')));
parent::menuConfig();
}
作者:BenjaminBec
项目:commerc
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
*/
public function menuConfig()
{
$language = $this->getLanguageService();
if (SettingsFactory::getInstance()->getExtConf('allowAggregation') == 1) {
$this->MOD_MENU = array('function' => array('1' => $language->getLL('statistics'), '2' => $language->getLL('incremental_aggregation'), '3' => $language->getLL('complete_aggregation')));
} else {
$this->MOD_MENU = array('function' => array('1' => $language->getLL('statistics')));
}
parent::menuConfig();
}
作者:danilov
项目:l10nmg
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*
* @return void
*/
function menuConfig()
{
$this->loadExtConf();
$this->MOD_MENU = array('action' => array('' => $GLOBALS['LANG']->getLL('general.action.blank.title'), 'link' => $GLOBALS['LANG']->getLL('general.action.edit.link.title'), 'inlineEdit' => $GLOBALS['LANG']->getLL('general.action.edit.inline.title'), 'export_excel' => $GLOBALS['LANG']->getLL('general.action.export.excel.title'), 'export_xml' => $GLOBALS['LANG']->getLL('general.action.export.xml.title')), 'lang' => array(), 'onlyChangedContent' => '', 'noHidden' => '');
// Load system languages into menu:
/** @var $t8Tools TranslationConfigurationProvider */
$t8Tools = GeneralUtility::makeInstance(TranslationConfigurationProvider::class);
$sysL = $t8Tools->getSystemLanguages();
foreach ($sysL as $sL) {
if ($sL['uid'] > 0 && $GLOBALS['BE_USER']->checkLanguageAccess($sL['uid'])) {
if ($this->lConf['enable_hidden_languages'] == 1) {
$this->MOD_MENU['lang'][$sL['uid']] = $sL['title'];
} elseif ($sL['hidden'] == 0) {
$this->MOD_MENU['lang'][$sL['uid']] = $sL['title'];
}
}
}
parent::menuConfig();
}
作者:clew
项目:t3jquer
/**
* Adds items to the ->MOD_MENU array. Used for the function menu selector.
*/
public function menuConfig()
{
$this->MOD_MENU = array('function' => array('1' => $this->LANG->sL('LLL:EXT:t3jquery/Classes/Module/locallang.xml:function1'), '2' => $this->LANG->sL('LLL:EXT:t3jquery/Classes/Module/locallang.xml:function2'), '3' => $this->LANG->sL('LLL:EXT:t3jquery/Classes/Module/locallang.xml:function3'), '4' => $this->LANG->sL('LLL:EXT:t3jquery/Classes/Module/locallang.xml:function4')));
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('extdeveval')) {
$this->MOD_MENU['function'][5] = $this->LANG->sL('LLL:EXT:t3jquery/Classes/Module/locallang.xml:function5');
}
parent::menuConfig();
}