protected function extendForm(FormBuilder $form)
    {
        $form->extend(function(FormGrid $form) {
            $fieldsetName = trans('antares/ban_management::title.config.title');

            $form->findFieldsetOrCreateNew($fieldsetName, function(Fieldset $fieldset) use($fieldsetName) {
                $fieldset->legend($fieldsetName);
                $rules = $this->rulesProcessor->getWhitelist()->map(function(RuleContract $rule) {
                            return $rule->getValue();
                        })->toArray();

                $fieldset->control('input:text', 'ban-management[options][max_failed_attempts]')
                        ->value($this->config->getMaxFailedAttempts())
                        ->label(trans('antares/ban_management::label.config.max-attempts'));

                $fieldset->control('input:textarea', 'ban-management[rules][ip-whitelist]')
                        ->value(implode("\r\n", $rules))
                        ->label(trans('antares/ban_management::label.config.ip-whitelist'))
                        ->attributes(['rows' => 5, 'cols' => 50])
                        ->help(trans('antares/ban_management::label.config.ip_whitelist_help'));

                $fieldset->control('input:text', 'cancel')
                        ->label('')
                        ->field(function() {
                            return app('html')->link(handles("antares::ban_management/rules/datatable"), trans('antares/ban_management::title.go_to_ban_management'));
                        });
            });
        });
    }
protected function extendForm(FormBuilder $form)
    {
        $form->extend(function(FormGrid $form) {
            $fieldsetName = trans('antares/ban_management::title.config.title');

            $form->findFieldsetOrCreateNew($fieldsetName, function(Fieldset $fieldset) use($fieldsetName) {
                $fieldset->legend($fieldsetName);
                $rules = $this->rulesProcessor->getWhitelist()->map(function(RuleContract $rule) {
                            return $rule->getValue();
                        })->toArray();

                $fieldset->control('input:text', 'ban-management[options][max_failed_attempts]')
                        ->value($this->config->getMaxFailedAttempts())
                        ->label(trans('antares/ban_management::label.config.max-attempts'));

                $fieldset->control('input:textarea', 'ban-management[rules][ip-whitelist]')
                        ->value(implode("\r\n", $rules))
                        ->label(trans('antares/ban_management::label.config.ip-whitelist'))
                        ->attributes(['rows' => 5, 'cols' => 50])
                        ->help(trans('antares/ban_management::label.config.ip_whitelist_help'));

                $fieldset->control('input:text', 'cancel')
                        ->label('')
                        ->field(function() {
                            return app('html')->link(handles("antares::ban_management/rules/datatable"), trans('antares/ban_management::title.go_to_ban_management'));
                        });
            });
        });
    }
protected function extendForm ( FormBuilder $ form ) { $ form -> extend ( function ( FormGrid $ form ) { $ fieldsetName = trans ( 'antares/ban_management::title.config.title' ) ; $ form -> findFieldsetOrCreateNew ( $ fieldsetName , function ( Fieldset $ fieldset ) use ( $ fieldsetName ) { $ fieldset -> legend ( $ fieldsetName ) ; $ rules = $ this -> rulesProcessor -> getWhitelist ( ) -> map ( function ( RuleContract $ rule ) { return $ rule -> getValue ( ) ; } ) -> toArray ( ) ; $ fieldset -> control ( 'input:text' , 'ban-management[options][max_failed_attempts]' ) -> value ( $ this -> config -> getMaxFailedAttempts ( ) ) -> label ( trans ( 'antares/ban_management::label.config.max-attempts' ) ) ; $ fieldset -> control ( 'input:textarea' , 'ban-management[rules][ip-whitelist]' ) -> value ( implode ( "\r\n" , $ rules ) ) -> label ( trans ( 'antares/ban_management::label.config.ip-whitelist' ) ) -> attributes ( [ 'rows' => 5 , 'cols' => 50 ] ) -> help ( trans ( 'antares/ban_management::label.config.ip_whitelist_help' ) ) ; $ fieldset -> control ( 'input:text' , 'cancel' ) -> label ( '' ) -> field ( function ( ) { return app ( 'html' ) -> link ( handles ( "antares::ban_management/rules/datatable" ) , trans ( 'antares/ban_management::title.go_to_ban_management' ) ) ; } ) ; } ) ; } ) ; }
Extends the form instance.

@param FormBuilder $form
Extends the form instance .