Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace BaseReality\Form;
- use Intahwebz\Form\Form;
- class LinkEditForm extends Form{
- function getDefinition() {
- $definition = array(
- 'startElements' => [
- [
- 'type' => \Intahwebz\FormElement\Title::class,
- 'value' => 'Link add',
- ]
- ],
- 'rowElements' => array(
- array(
- 'type' => \Intahwebz\FormElement\Text::class,
- 'label' => 'Description',
- 'name' => 'description',
- 'validation' => array(
- "Zend\\Validator\\StringLength" => array(
- 'min' => 8,
- ),
- )
- ),
- array(
- 'type' => \Intahwebz\FormElement\Text::class,
- 'label' => 'URL',
- 'name' => 'url',
- 'validation' => array(
- \Intahwebz\Validator\URL::class => array(),
- ),
- ),
- ),
- 'endElements' => array(
- array(
- 'submitButton',
- 'type' => \Intahwebz\FormElement\SubmitButton::class,
- 'label' => null,
- 'text' => 'Add link',
- ),
- ),
- 'validation' => array(
- //form level validation.
- )
- );
- return $definition;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement