1 | <?php |
||
3 | namespace Dynamic\ProductCatalog\Page; |
||
4 | |||
5 | use Dynamic\ProductCatalog\Docs\ProductDoc; |
||
6 | use SilverStripe\Core\ClassInfo; |
||
7 | use SilverStripe\Forms\DropdownField; |
||
8 | |||
9 | class ProductDocCollection extends \Page |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | private static $db = array( |
||
15 | 1 | 'ManagedClass' => 'Varchar(255)', |
|
16 | ); |
||
17 | 1 | ||
18 | /** |
||
19 | 1 | * @var string |
|
20 | 1 | */ |
|
21 | 1 | private static $table_name = 'ProductDocCollection'; |
|
|
|||
22 | 1 | ||
23 | 1 | /** |
|
24 | * @return FieldList |
||
25 | 1 | */ |
|
26 | 1 | public function getCMSFields() |
|
27 | 1 | { |
|
28 | 1 | $fields = parent::getCMSFields(); |
|
29 | |||
30 | 1 | if ($relations = ClassInfo::subclassesFor(ProductDoc::class)) { |
|
31 | 1 | unset($relations[ProductDoc::class]); |
|
32 | foreach ($relations as $key => $value) { |
||
33 | 1 | $relations[$key] = singleton($value)->i18n_singular_name(); |
|
34 | } |
||
35 | |||
36 | $fields->addFieldToTab( |
||
46 | } |
This check marks private properties in classes that are never used. Those properties can be removed.