1 | <?php |
||
20 | class BlogMemberExtension extends DataExtension |
||
21 | { |
||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private static $db = array( |
||
|
|||
26 | 'URLSegment' => 'Varchar', |
||
27 | 'BlogProfileSummary' => 'Text' |
||
28 | ); |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private static $has_one = array( |
||
34 | 'BlogProfileImage' => 'SilverStripe\\Assets\\Image' |
||
35 | ); |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | private static $belongs_many_many = array( |
||
41 | 'BlogPosts' => 'SilverStripe\\Blog\\Model\\BlogPost' |
||
42 | ); |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function onBeforeWrite() |
||
58 | |||
59 | /** |
||
60 | * Generate a unique URL segment based on the Member's name. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function generateURLSegment() |
||
76 | |||
77 | /** |
||
78 | * Returns TRUE if this object has a URL segment value that does not conflict with any other |
||
79 | * objects. |
||
80 | * |
||
81 | * @return bool |
||
82 | */ |
||
83 | public function validURLSegment() |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function updateCMSFields(FieldList $fields) |
||
125 | } |
||
126 |
This check marks private properties in classes that are never used. Those properties can be removed.