Last active
August 29, 2015 14:24
-
-
Save RyanThompson/102888a4b09f0aea95ba to your computer and use it in GitHub Desktop.
How to use property handlers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Acme\Foo\Form; | |
use Anomaly\Streams\Platform\Ui\Form\FormBuilder; | |
class FooFormBuilder extends FormBuilder | |
{ | |
/** | |
* Define your property normally. | |
*/ | |
protected $sections = [ | |
// Your sections information. | |
]; | |
/** | |
* You can define your own handlers. | |
*/ | |
protected $sections = 'My\Section\HandlerClass@handle'; | |
/** | |
* Or use use the default handler. | |
*/ | |
// protected $sections = []; | |
// Will look for 'Acme\Foo\Form\FooFormSections@handle' if no $sections are defined and default to [] or null usually; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment