FormBase
extends Form
in package
Auto generate form elements based on a model
Table of Contents
- $patterns : array<string|int, mixed>
- Inputs type patterns
- initialize() : void
- Generate all elements of the instance model form
Properties
$patterns
Inputs type patterns
protected
array<string|int, mixed>
$patterns
= ['phone' => ['pattern' => '\\(?([0-9]{3})\\)?([ .-]?)([0-9]{3})\\2([0-9]{4})'], 'postal_code' => ['pattern' => '^(([0-8][0-9])|(9[0-5]))[0-9]{3}$'], 'password' => [], 'email' => []]
Methods
initialize()
Generate all elements of the instance model form
public
initialize(mixed $entity[, null|array<string|int, mixed> $data = [] ]) : void
Parameters
- $entity : mixed
-
Model instance
- $data : null|array<string|int, mixed> = []