1 | <?php |
||
4 | class CMSEditLinkField extends ReadonlyField |
||
|
|||
5 | { |
||
6 | |||
7 | /** |
||
8 | * what are we linking to? |
||
9 | * @var DataObject |
||
10 | */ |
||
11 | protected $linkedObject = null; |
||
12 | |||
13 | /** |
||
14 | * appendix for field name |
||
15 | * @var String |
||
16 | */ |
||
17 | protected $nameAppendix = '_CMSEditLink'; |
||
18 | |||
19 | |||
20 | /** |
||
21 | * |
||
22 | * @param string $name e.g. MyLinkedObjectID |
||
23 | * @param string $title e.g. My Fancy Title |
||
24 | * @param DataObject $linkedObject e.g. $this->MyLinkedObjectID() |
||
25 | * @param string $methodOrVariable (OPTIONAL) - e.g. MyFullTitle |
||
26 | */ |
||
27 | public function __construct($name, $title, $linkedObject, $methodOrVariable = 'getTitle') |
||
48 | |||
49 | /** |
||
50 | * |
||
51 | * |
||
52 | * @param string $s |
||
53 | */ |
||
54 | function setNameAppendix($s) |
||
58 | |||
59 | |||
60 | } |
||
61 |
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.