1 | <?php |
||
7 | class EditableFormStep extends EditableFormField |
||
|
|||
8 | { |
||
9 | |||
10 | private static $singular_name = 'Page Break'; |
||
11 | |||
12 | private static $plural_name = 'Page Breaks'; |
||
13 | |||
14 | /** |
||
15 | * Disable selection of step class |
||
16 | * |
||
17 | * @config |
||
18 | * @var bool |
||
19 | */ |
||
20 | private static $hidden = true; |
||
21 | |||
22 | /** |
||
23 | * @return FieldList |
||
24 | */ |
||
25 | public function getCMSFields() |
||
33 | |||
34 | /** |
||
35 | * @return FormField |
||
36 | */ |
||
37 | 9 | public function getFormField() |
|
45 | |||
46 | 9 | protected function updateFormField($field) |
|
47 | { |
||
48 | // if this field has an extra class |
||
49 | 9 | if ($this->ExtraClass) { |
|
50 | $field->addExtraClass($this->ExtraClass); |
||
51 | } |
||
52 | 9 | } |
|
53 | |||
54 | /** |
||
55 | * @return boolean |
||
56 | */ |
||
57 | 2 | public function showInReports() |
|
61 | |||
62 | public function getInlineClassnameField($column, $fieldClasses) |
||
63 | { |
||
64 | return new LabelField( |
||
65 | $column, |
||
66 | $this->CMSTitle |
||
67 | ); |
||
68 | } |
||
69 | |||
70 | public function getCMSTitle() |
||
71 | { |
||
72 | $title = $this->getFieldNumber() |
||
73 | ?: $this->Title |
||
74 | ?: ''; |
||
75 | |||
76 | return _t( |
||
77 | 'EditableFormStep.STEP_TITLE', |
||
78 | 'Page {page}', |
||
79 | array( |
||
80 | 'page' => $title |
||
81 | ) |
||
82 | ); |
||
83 | } |
||
84 | |||
85 | /** |
||
86 | * Get the JS expression for selecting the holder for this field |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getSelectorHolder() |
||
94 | } |
||
95 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.