1 | <?php |
||
17 | class GridFieldClearAllButton implements GridField_HTMLProvider, GridField_ActionProvider |
||
18 | { |
||
19 | /** |
||
20 | * Fragment to write the button to |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $targetFragment; |
||
25 | |||
26 | /** |
||
27 | * @param string $targetFragment The HTML fragment to write the button into |
||
28 | */ |
||
29 | public function __construct($targetFragment = 'after') |
||
33 | |||
34 | /** |
||
35 | * Add a "clear all" button to a <p> tag and assign it to the target fragment |
||
36 | * |
||
37 | * @param GridField $gridField |
||
38 | * @return array |
||
39 | */ |
||
40 | public function getHTMLFragments($gridField) |
||
49 | |||
50 | /** |
||
51 | * {@inheritDoc} |
||
52 | * |
||
53 | * @throws ValidationException If the current user does not have permission to delete records |
||
54 | */ |
||
55 | public function handleAction(GridField $gridField, $actionName, $arguments, $data) |
||
69 | |||
70 | /** |
||
71 | * {@inheritDoc} |
||
72 | */ |
||
73 | public function getActions($gridField) |
||
77 | } |
||
78 |