The documentation you are viewing is for an older version of this component.
Switch to the latest (v3) version.
laminas-form comes with an initial set of laminas-view helper classes for tasks such as rendering forms, rendering a text input, rendering a selection box, etc.
See the view helpers documentation for more information.
IDE auto-completion in templates
Laminas\Form\View\HelperTraittrait can be used to provide auto-completion for modern IDEs. It defines the aliases of the view helpers in a DocBlock as
In order to allow auto-completion in templates,
$thisvariable should be type-hinted via a DocBlock at the top of your template. It is recommended that you always add the
Laminas\View\Renderer\PhpRendereras the first type, so that the IDE can auto-suggest the default view helpers from
laminas-view. Next, chain the
laminas-formwith a pipe symbol (a.k.a. vertical bar)
/** * @var Laminas\View\Renderer\PhpRenderer|Laminas\Form\View\HelperTrait $this */
You may chain as many
HelperTraittraits as you like, depending on view helpers from which Laminas component you are using and would like to provide auto-completion for.