Admin\Form\Notifications\BatchDefinition::define PHP Method

define() public method

Define the form fields.
public define ( Windwalker\Form\Form $form ) : void
$form Windwalker\Form\Form The Windwalker form object.
return void
    public function define(Form $form)
    {
        /*
         * This is batch form definition.
         * -----------------------------------------------
         * Every field is a table column.
         * For example, you can add a 'category_id' field to update item category.
         */
        $form->wrap(null, 'batch', function (Form $form) {
            // Language
            $form->add('language', new ListField())->label('Language')->set('class', 'col-md-12')->addOption(new Option('-- Select Language --', ''))->addOption(new Option('English', 'en-GB'))->addOption(new Option('Chinese Traditional', 'zh-TW'));
            // Author
            $form->add('created_by', new TextField())->label('Author');
        });
    }
BatchDefinition