mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-28 20:29:15 +02:00
22 lines
648 B
PHP
22 lines
648 B
PHP
|
<?php
|
||
|
|
||
|
namespace SilverStripe\Forms\GridField;
|
||
|
|
||
|
/**
|
||
|
* A GridField component that provides state, notably default state.
|
||
|
*
|
||
|
* Implementation of this interface is optional; without it, no default state is assumed.
|
||
|
* The benefit of default state is that it won't be included in URLs, keeping URLs tidier.
|
||
|
*/
|
||
|
interface GridField_StateProvider extends GridFieldComponent
|
||
|
{
|
||
|
/**
|
||
|
* Initialise the default state in the given GridState_Data
|
||
|
*
|
||
|
* We recommend that you call $data->initDefaults() to do this.
|
||
|
*
|
||
|
* @param $data The top-level sate object
|
||
|
*/
|
||
|
public function initDefaultState(GridState_Data $data): void;
|
||
|
}
|