| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class HistoryViewerField extends FormField |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Default to using the SiteTree component |
||
| 13 | * |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $schemaComponent = 'PageHistoryViewer'; |
||
| 17 | |||
| 18 | public function __construct($name, $title = null, $value = null) |
||
| 19 | { |
||
| 20 | Requirements::javascript('silverstripe/versioned-admin:client/dist/js/bundle.js'); |
||
| 21 | Requirements::css('silverstripe/versioned-admin:client/dist/styles/bundle.css'); |
||
| 22 | |||
| 23 | parent::__construct($name, $title, $value); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get the source record to view history for |
||
| 28 | * |
||
| 29 | * @return DataObject|null |
||
| 30 | */ |
||
| 31 | public function getSourceRecord() |
||
| 34 | } |
||
| 35 | } |
||
| 36 |