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


PHP XoopsModule::get方法代码示例

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


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

示例1: loadRolesByModule

 /**
  * Loads roles of the specific module with $module, and set loaded roles to
  * the current principal.
  * @static
  * @param XoopsModule $module
  */
 function loadRolesByModule(&$module)
 {
     static $cache;
     $root =& XCube_Root::getSingleton();
     $context =& $root->mContext;
     if ($module == null) {
         return;
     }
     if (isset($cache[$module->get('mid')])) {
         return;
     }
     $groups = is_object($context->mXoopsUser) ? $context->mXoopsUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
     $handler =& xoops_gethandler('groupperm');
     if ($handler->checkRight('module_read', $module->get('mid'), $groups)) {
         $context->mUser->addRole('Module.' . $module->get('dirname') . '.Visitor');
     }
     if (is_object($context->mXoopsUser) && $handler->checkRight('module_admin', $module->get('mid'), $groups)) {
         $context->mUser->addRole('Module.' . $module->get('dirname') . '.Admin');
     }
     $handler =& xoops_getmodulehandler('group_permission', 'legacy');
     $roleArr = $handler->getRolesByModule($module->get('mid'), $groups);
     foreach ($roleArr as $role) {
         $context->mUser->addRole('Module.' . $module->get('dirname') . '.' . $role);
     }
     $cache[$module->get('mid')] = true;
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:32,代码来源:Legacy_RoleManager.class.php

示例2: executeViewInput

 /**
  * @todo no $renderer. It should be $render.
  */
 function executeViewInput(&$controller, &$xoopsUser, &$renderer)
 {
     $renderer->setTemplateName("module_install.html");
     $renderer->setAttribute('module', $this->mXoopsModule);
     $renderer->setAttribute('actionForm', $this->mActionForm);
     $renderer->setAttribute('currentVersion', round($this->mXoopsModule->get('version') / 100, 2));
 }
开发者ID:nouphet,项目名称:rata,代码行数:10,代码来源:ModuleInstallAction.class.php

示例3: executeUninstall

 /**
  * execute uninstall.
  *
  * @return bool
  */
 public function executeUninstall()
 {
     $this->_uninstallTables();
     if (!$this->_mForceMode && $this->mLog->hasError()) {
         $this->_processReport();
         return false;
     }
     if ($this->_mXoopsModule->get('mid') != null) {
         $this->_uninstallModule();
         if (!$this->_mForceMode && $this->mLog->hasError()) {
             $this->_processReport();
             return false;
         }
         $this->_uninstallTemplates();
         if (!$this->_mForceMode && $this->mLog->hasError()) {
             $this->_processReport();
             return false;
         }
         $this->_uninstallBlocks();
         if (!$this->_mForceMode && $this->mLog->hasError()) {
             $this->_processReport();
             return false;
         }
         $this->_uninstallPreferences();
         if (!$this->_mForceMode && $this->mLog->hasError()) {
             $this->_processReport();
             return false;
         }
     }
     $this->_processReport();
     return true;
 }
开发者ID:neuroinformatics,项目名称:xcl-module-cosmoapi,代码行数:37,代码来源:Uninstaller.class.php

示例4:

 function _processReport()
 {
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatMessage(_AD_LEGACY_MESSAGE_UPDATING_MODULE_SUCCESSFUL, $this->_mCurrentXoopsModule->get('name')));
     } else {
         $this->mLog->addError(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_UPDATING_MODULE_FAILURE, $this->_mCurrentXoopsModule->get('name')));
     }
 }
开发者ID:nunoluciano,项目名称:uxcl,代码行数:8,代码来源:ModuleUpdater.class.php

示例5:

 function _processReport()
 {
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatString(_AD_LEGACY_MESSAGE_INSTALLATION_MODULE_SUCCESSFUL, $this->_mXoopsModule->get('name')));
     } else {
         $this->mLog->addError(XCube_Utils::formatString(_AD_LEGACY_ERROR_INSTALLATION_MODULE_FAILURE, $this->_mXoopsModule->get('name')));
     }
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:8,代码来源:ModuleInstaller.class.php

示例6: _processReport

 /**
  * process report.
  */
 private function _processReport()
 {
     $dirname = $this->_mCurrentXoopsModule->get('dirname');
     $constpref = '_MI_' . strtoupper($dirname);
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatString(constant($constpref . '_INSTALL_MSG_MODULE_UPDATED'), $this->_mCurrentXoopsModule->get('name')));
     } else {
         $this->mLog->add(XCube_Utils::formatString(constant($constpref . '_INSTALL_ERROR_MODULE_UPDATED'), $this->_mCurrentXoopsModule->get('name')));
     }
 }
开发者ID:neuroinformatics,项目名称:xcl-module-cosmoapi,代码行数:13,代码来源:Updater.class.php

示例7: _processReport

 /**
  * process report.
  */
 private function _processReport()
 {
     $dirname = $this->_mXoopsModule->get('dirname');
     $constpref = '_MI_' . strtoupper($dirname);
     if (!$this->mLog->hasError()) {
         $this->mLog->add(XCube_Utils::formatString(constant($constpref . '_INSTALL_MSG_MODULE_INSTALLED'), $this->_mXoopsModule->getInfo('name')));
     } elseif (is_object($this->_mXoopsModule)) {
         $this->mLog->addError(XCube_Utils::formatString(constant($constpref . '_INSTALL_ERROR_MODULE_INSTALLED'), $this->_mXoopsModule->getInfo('name')));
     } else {
         $this->mLog->addError(XCube_Utils::formatString(constant($constpref . '_INSTALL_ERROR_MODULE_INSTALLED'), 'something'));
     }
 }
开发者ID:neuroinformatics,项目名称:xcl-module-cosmoapi,代码行数:15,代码来源:Installer.class.php

示例8: execute

 /**
  * Do execute porting. This member function is added to Delegate.
  * 
  * @access public
  * @param XoopsModule $module
  * @param Legacy_ModuleInstallLog $log
  */
 function execute(&$module, &$log)
 {
     if ($module->get('dirname') != 'XUpgrade') {
         return;
     }
     $this->mLog =& $log;
     $log->add(_MI_XUPGRADE_MESSAGE_START_PORTING);
     $this->_portConfigs();
     if (XUPGRADE_ENABLE_TEMPLATEPORTING == true) {
         $this->_portTemplates();
     }
     if ($this->mIsInstall) {
         $this->_adjustModules();
     }
 }
开发者ID:nouphet,项目名称:rata,代码行数:22,代码来源:UpgradeProcessor.class.php

示例9: CriteriaCompo

 /**
  * @private
  * Uninstalls the block template data specified by $block of $module.
  * @param XoopsBlock  $block
  * @param XoopsModule $module This object is must the module which has $block.
  * @param string      $tplset A name of the template set. If this is null, uninstalls
  *                            all templates of any template-sets. 
  * @param $log
  * @remarks
  *     This method users template handlers of the kernel. But, if they are hooked,
  *     they may not do something. So, abstraction mechanism is possible enough.
  */
 function _uninstallBlockTemplate(&$block, &$module, $tplset, &$log)
 {
     $handler =& xoops_gethandler('tplfile');
     $criteria = new CriteriaCompo();
     $criteria->add(new Criteria('tpl_refid', $block->get('bid')));
     $criteria->add(new Criteria('tpl_file', $block->get('template')));
     $criteria->add(new Criteria('tpl_module', $module->get('dirname')));
     $criteria->add(new Criteria('tpl_type', 'block'));
     if ($tplset != null) {
         // See 'FIXME'
         $criteria->add(new Criteria('tpl_tplset', $tplset));
     }
     $handler->deleteAll($criteria);
 }
开发者ID:nunoluciano,项目名称:uxcl,代码行数:26,代码来源:ModuleInstallUtils.class.php


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