xref: /dokuwiki/lib/plugins/config/core/Setting/SettingLicense.php (revision a19c9aa0217112e3ab7ebc160354c7e9fbabe8eb)
1<?php
2
3namespace dokuwiki\plugin\config\core\Setting;
4
5/**
6 * Class setting_license
7 */
8class SettingLicense extends SettingMultichoice
9{
10
11    protected $choices = [''];      // none choosen
12
13    /** @inheritdoc */
14    public function initialize($default = null, $local = null, $protected = null)
15    {
16        global $license;
17
18        foreach($license as $key => $data) {
19            $this->choices[] = $key;
20            $this->lang[$this->key . '_o_' . $key] = $data['name']; // stored in setting
21        }
22
23        parent::initialize($default, $local, $protected);
24    }
25}
26