Backend\Modules\Faq\Actions\Settings::loadForm PHP Метод

loadForm() приватный Метод

Loads the settings form
private loadForm ( )
    private function loadForm()
    {
        // init settings form
        $this->frm = new BackendForm('settings');
        $this->frm->addDropdown('overview_number_of_items_per_category', array_combine(range(1, 30), range(1, 30)), $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items_per_category', 10));
        $this->frm->addDropdown('most_read_number_of_items', array_combine(range(1, 10), range(1, 10)), $this->get('fork.settings')->get($this->URL->getModule(), 'most_read_num_items', 10));
        $this->frm->addDropdown('related_number_of_items', array_combine(range(1, 10), range(1, 10)), $this->get('fork.settings')->get($this->URL->getModule(), 'related_num_items', 3));
        $this->frm->addCheckbox('allow_multiple_categories', $this->get('fork.settings')->get($this->URL->getModule(), 'allow_multiple_categories', false));
        $this->frm->addCheckbox('spamfilter', $this->get('fork.settings')->get($this->URL->getModule(), 'spamfilter', false));
        $this->frm->addCheckbox('allow_feedback', $this->get('fork.settings')->get($this->URL->getModule(), 'allow_feedback', false));
        $this->frm->addCheckbox('allow_own_question', $this->get('fork.settings')->get($this->URL->getModule(), 'allow_own_question', false));
        $this->frm->addCheckbox('send_email_on_new_feedback', $this->get('fork.settings')->get($this->URL->getModule(), 'send_email_on_new_feedback', false));
        // no Akismet-key, so we can't enable spam-filter
        if ($this->get('fork.settings')->get('Core', 'akismet_key') == '') {
            $this->frm->getField('spamfilter')->setAttribute('disabled', 'disabled');
            $this->tpl->assign('noAkismetKey', true);
        }
    }