mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Fix linting issues and fix doc
This commit is contained in:
parent
6424f4dea0
commit
e07658ef50
@ -1,8 +1,6 @@
|
||||
<?php
|
||||
namespace SilverStripe\Forms\GridField;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridField_ColumnProvider;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\Versioned\Versioned;
|
||||
use SilverStripe\Core\Convert;
|
||||
@ -17,7 +15,8 @@ class GridFieldVersionedState implements GridField_ColumnProvider
|
||||
*/
|
||||
protected $versionedLabelFields = ['Title'];
|
||||
|
||||
public function __construct($versionedLabelFields = null) {
|
||||
public function __construct($versionedLabelFields = null)
|
||||
{
|
||||
if ($versionedLabelFields) {
|
||||
$this->versionedLabelFields = $versionedLabelFields;
|
||||
}
|
||||
@ -48,9 +47,8 @@ class GridFieldVersionedState implements GridField_ColumnProvider
|
||||
|
||||
if (count($matchedVersionedFields) > 0) {
|
||||
$this->column = array_values($matchedVersionedFields)[0];
|
||||
}
|
||||
} elseif ($columns) {
|
||||
// Use first column
|
||||
else if ($columns) {
|
||||
$this->column = $columns[0];
|
||||
}
|
||||
}
|
||||
@ -142,11 +140,11 @@ class GridFieldVersionedState implements GridField_ColumnProvider
|
||||
* )
|
||||
* ```
|
||||
*
|
||||
* @param bool $cached Whether to serve the fields from cache; false
|
||||
* regenerate them
|
||||
* @param DataObject $record - the record to check status for
|
||||
* @return array
|
||||
*/
|
||||
protected function getStatusFlags($record) {
|
||||
protected function getStatusFlags($record)
|
||||
{
|
||||
$flags = array();
|
||||
|
||||
if ($record->isOnLiveOnly()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user