2017 © Pedro Peláez
 

yii2-extension yii2-docblock-form

Makes a form out of class property docblocks

image

nuffic/yii2-docblock-form

Makes a form out of class property docblocks

  • Friday, December 16, 2016
  • by Nuffic
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Usage example

Class definition

class Person
{
    /**
     * @input
     * @validator {"class": "\\yii\\validators\\RequiredValidator"}
     * @validator {"class": "\\yii\\validators\\StringValidator", "min": 3, "max": 30}
     */
    public $name;

    /**
     * @input widget["kartik\\switchinput\\SwitchInput", {"template": "default"}]
     * @input {"class": \\yii\\validators\\BooleanValidator", "skipOnEmpty": false}
     */
    public $age;
}

Form rendering


$form = ActiveForm::begin(); echo \nuffic\docblock\widget\Configure::widget([ 'form' => $form, 'reflection' => new \nuffic\docblockReflectionBuilder(Person::class), ]); $form->end();

The Versions

16/12 2016

dev-develop

dev-develop

Makes a form out of class property docblocks

  Sources   Download

The Requires

 

The Development Requires

by Kaupo Juhkam

06/12 2016

dev-feature/tests

dev-feature/tests

Makes a form out of class property docblocks

  Sources   Download

The Requires

 

The Development Requires

by Kaupo Juhkam