LoginSignup
0
0

More than 5 years have passed since last update.

XOOPS Cubeで特定のモジュールの一般設定を取得する方法

Last updated at Posted at 2015-04-22

モジュールの中ではグローバル変数の$xoopsModuleConfigでそのモジュールの一般設定の値を取得できるが、別のモジュールの一般設定を参照したいことがあったのでその方法をメモ。

$moduleHandler = xoops_gethandler('module');

// モジュール指定 target_module_dirname を一般設定を取得したいモジュールのディレクトリ名に変更してください
$targetModule = $moduleHandler->getByDirname('target_module_dirname');

// コンフィグ取得
$configHandler =& xoops_gethandler('config');

// targetModuleConfigに対象モジュールの一般設定が入る
$targetModuleConfig = $configHandler->getConfigsByCat(0, $targetModule->get('mid'));
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0