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() |
||
60 | |||
61 | /** |
||
62 | * Generate a unique URL segment based on the Member's name. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public function generateURLSegment() |
||
78 | |||
79 | /** |
||
80 | * Returns TRUE if this object has a URL segment value that does not conflict with any other |
||
81 | * objects. |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | public function validURLSegment() |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | public function updateCMSFields(FieldList $fields) |
||
127 | } |
||
128 |
This check marks private properties in classes that are never used. Those properties can be removed.