1 | <?php |
||
22 | class BlogMemberExtension extends DataExtension |
||
23 | { |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private static $db = array( |
||
|
|||
28 | 'URLSegment' => 'Varchar', |
||
29 | 'BlogProfileSummary' => 'Text' |
||
30 | ); |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | private static $has_one = array( |
||
36 | 'BlogProfileImage' => Image::class |
||
37 | ); |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | private static $belongs_many_many = array( |
||
43 | 'BlogPosts' => BlogPost::class |
||
44 | ); |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function onBeforeWrite() |
||
64 | |||
65 | /** |
||
66 | * Generate a unique URL segment based on the Member's name. |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | public function generateURLSegment() |
||
82 | |||
83 | /** |
||
84 | * Returns TRUE if this object has a URL segment value that does not conflict with any other |
||
85 | * objects. |
||
86 | * |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function validURLSegment() |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function updateCMSFields(FieldList $fields) |
||
131 | } |
||
132 |
This check marks private properties in classes that are never used. Those properties can be removed.