CMSimple_XH 開発者ドキュメント
PluginConfigFileEdit.php
1 <?php
2 
16 namespace XH;
17 
29 {
39  public function __construct()
40  {
42 
43  parent::__construct();
44  $this->caption = ucfirst($plugin) . ' &ndash; '
45  . utf8_ucfirst($tx['filetype']['config']);
46  $fn = $pth['folder']['plugins'] . $plugin . '/config/metaconfig.php';
47  if (is_readable($fn)) {
48  include $fn;
49  }
50  $mcf = isset($plugin_mcf[$plugin]) ? $plugin_mcf[$plugin] : array();
51  $this->filename = $pth['file']['plugin_config'];
52  $this->params = array('admin' => 'plugin_config',
53  'action' => 'plugin_save');
54  $this->redir = '?&' . $plugin
55  . '&admin=plugin_config&action=plugin_edit&xh_success=config';
56  $this->varName = 'plugin_cf';
57  $this->cfg = array();
58  foreach ($plugin_cf[$plugin] as $key => $val) {
59  list($cat, $name) = $this->splitKey($key);
60  $omcf = isset($mcf[$key])
61  ? $mcf[$key]
62  : (utf8_strlen($val) <= 50 ? 'string' : 'text');
63  $hint = isset($plugin_tx[$plugin]["cf_$key"])
64  ? $plugin_tx[$plugin]["cf_$key"] : null;
65  $this->cfg[$cat][$name] = $this->option($omcf, $val, $hint);
66  }
67  }
68 }
$plugin
Definition: cms.php:856
utf8_ucfirst($string)
Definition: utf8.php:118
$plugin_cf
Definition: cms.php:1082
utf8_strlen($string)
Definition: utf8.php:28
$plugin_tx
Definition: cms.php:1095
$tx
Definition: cms.php:363
$pth
Definition: cms.php:230