Download the PHP package pollen-solutions/field without Composer
On this page you can find all versions of the php package pollen-solutions/field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pollen-solutions/field
More information about pollen-solutions/field
Files in pollen-solutions/field
Package field
Short Description Pollen Solutions - Field Component - Layer and tools for creating reusable form fields.
License MIT
Homepage https://www.presstify.com/pollen-solutions/field/
Informations about the package field
Field Component
Pollen Solutions Field Component provides a layer and tools for creating reusable form fields.
Installation
From a callable
From the default field input driver
From a custom driver
Through a PSR-11 depency injection container
Shows a field driver instance with custom parameters
Recalls the same field driver instance with keeped custom parameters
Partial driver API
Partial driver parameters of call
Field driver instance methods
View API usage
Plates view engine
Field driver used Plates as default template engine.
-
Creates a view file for the field driver.
- Creates and call a field driver with this above file directory as view directory.
Uses another view engine
Your are free to used your own instance of Pollen\View\ViewInterface as the field driver view parameter if needed. In this example Twig engine is used instead Plates.
-
Creates a view file for the field driver.
- Creates and call a field driver with this above file directory as view directory.
Routing API usage
In some cases, field driver should be able to send a response through a controller, for example to respond from a rest api call.
Fortunately, all field driver instance are related to a route stack and have a reponseController method to do that. The field driver route stack is created for all known HTTP methods (GET, POST, PATH, OPTIONS, DELETE) and for a particular api method that works with XHR HTTP request.
-
Creates a field driver and gets its route url for the get http method.
- Now you can call the route url in your browser.
Get the field response
Obviously, you are free to use your own routing stack and them controller methods instead.
Field drivers
Natively, the Field component provides a collection of predefined drivers.
Button
Checkbox
Checkbox collection
File
Hidden
Input
Label
Number
Password
Radio
Radio collection
Required
Select
Submit
Text
Textarea
All versions of field with dependencies
pollen-solutions/http Version ^1.0
pollen-solutions/partial Version ^1.0
pollen-solutions/routing Version ^1.0
pollen-solutions/support Version ^1.0
pollen-solutions/validation Version ^1.0
pollen-solutions/view Version ^1.0
pollen-solutions/view-extends Version ^1.0