Skip to content

Instantly share code, notes, and snippets.

@RyanThompson
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanThompson/102888a4b09f0aea95ba to your computer and use it in GitHub Desktop.
Save RyanThompson/102888a4b09f0aea95ba to your computer and use it in GitHub Desktop.
How to use property handlers.
<?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