Habari\AdminImportHandler::get_form PHP Метод

get_form() публичный Метод

Builds and returns the form for the first stage of the importer
public get_form ( $importers, $importer ) : FormUI
Результат FormUI The FormUI element used to chose the importer
    public function get_form($importers, $importer)
    {
        $form = new FormUI('import');
        if (count($importers) == 0) {
            $form->append(FormControlStatic(' <p>' . _t('You do not currently have any import plugins installed.') . '</p>'));
            $form->append(FormControlStatic(' <p>' . _t('Please <a href="%1$s">activate an import plugin</a> to enable importing.', array(URL::get('display_plugins'))) . '</p>'));
        } else {
            $form->append(FormControlLabel::wrap(_t('Please choose the type of import to perform:'), FormControlSelect::create('importer')->set_options(array_combine($importers, $importers))));
            $form->append(FormControlSubmit::create('import')->set_caption(_t('Select')));
        }
        return $form->get();
    }