Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

4. Global Options

neilime edited this page Nov 4, 2016 · 1 revision

Ignore custom view helpers

By default, this module tries to add form-control class to every form element. There are some elements, like checkboxes, radios and buttons, that does not use that class in bootstrap. This config allows you to tell the render method to ignore your custom form view helper and do NOT add that class.

    return [
        'twbbundle' => [
            'ignoredViewHelpers' => [
                'viewhelpername',
            ],
        ]
    ];

Add instance maps and type maps to view helper

This config options allow to change instance and type map to FormElement class. That functional is good approach when new elements (or elements and them viewhelpers) are added into your project.

    return [
        'twbbundle' => [
            'type_map' => [
                'help_words' => 'formhelpwords',
            ],
            'class_map' => [
                'Application\Form\Element\HelpWords' => 'formhelpwords',
            ],
        ]
    ];
Clone this wiki locally