UncleCheese\BetterButtons\FormFields\DropdownFormAction
Defines the button that holds several form actions and exposes them on click
- Author: Uncle Cheese <unclecheese@leftandmain.com>
Synopsis
class DropdownFormAction
extends CompositeField
implements
BetterButtonInterface
{
- // members
- private static array $extensions = ;
- protected static integer $instance_count = 0;
- protected $identifier;
- // methods
- public void __construct()
- public void Field()
- public string DropdownID()
- public boolean shouldDisplay()
- public $this bindGridField()
Hierarchy
Extends
- SilverStripe\Forms\CompositeField
Implements
Members
private
- $extensions
protected
- $identifier
—
string
A unique identifier assigned through $instance_count - $instance_count
—
integer
To ensure the buttons get unique ids, keep track of the instances
Methods
public
- __construct() — Builds the button
- DropdownID() — A unique id for the dropdown button
- Field() — Renders the button, includes the JS and CSS
- bindGridField() — Binds to the GridField request, and transforms the buttons
- shouldDisplay() — Determines if the button should displsy