| 1 | <?php |
||
| 3 | class ContentBlock extends Block |
||
|
|
|||
| 4 | { |
||
| 5 | /** |
||
| 6 | * If the singular name is set in a private static $singular_name, it cannot be changed using the translation files |
||
| 7 | * for some reason. Fix it by defining a method that handles the translation. |
||
| 8 | * @return string |
||
| 9 | */ |
||
| 10 | public function singular_name() |
||
| 14 | |||
| 15 | /** |
||
| 16 | * If the plural name is set in a private static $plural_name, it cannot be changed using the translation files |
||
| 17 | * for some reason. Fix it by defining a method that handles the translation. |
||
| 18 | * @return string |
||
| 19 | */ |
||
| 20 | public function plural_name() |
||
| 24 | |||
| 25 | private static $db = array( |
||
| 26 | 'Content' => 'HTMLText', |
||
| 27 | ); |
||
| 28 | |||
| 29 | public function fieldLabels($includeRelations = true) |
||
| 38 | } |
||
| 39 |
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.