Issues (2)

src/Forms/PublishedStateDropdown.php (1 issue)

1
<?php
2
3
namespace Sunnnysideup\SearchOnVersionStatus\Forms;
4
5
use SilverStripe\Forms\DropdownField;
6
use SilverStripe\Versioned\Versioned;
0 ignored issues
show
The type SilverStripe\Versioned\Versioned was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class PublishedStateDropdown extends DropdownField
9
{
10
    public function getSource()
11
    {
12
        $array = parent::getSource();
13
        $array['none'] = '-- any --';
14
        $array[Versioned::DRAFT] = 'Unpublished';
15
        $array[Versioned::LIVE] = 'Published';
16
        $array['MODIFIED'] = 'Published with modifications';
17
        $array['PUBLISHED_CLEAN'] = 'Published without modifications';
18
        $array['DRAFT_ERROR'] = 'Published but draft is missing (error!)';
19
20
        return $array;
21
    }
22
}
23