1 | <?php |
||
9 | class Addon extends DataObject |
||
10 | { |
||
11 | |||
12 | public static $db = array( |
||
13 | 'Name' => 'Varchar(255)', |
||
14 | 'Description' => 'Text', |
||
15 | 'Type' => 'Varchar(100)', |
||
16 | 'Readme' => 'HTMLText', |
||
17 | 'Released' => 'SS_Datetime', |
||
18 | 'Repository' => 'Varchar(255)', |
||
19 | 'Downloads' => 'Int', |
||
20 | 'DownloadsMonthly' => 'Int', |
||
21 | 'Favers' => 'Int', |
||
22 | 'LastUpdated' => 'SS_Datetime', |
||
23 | 'LastBuilt' => 'SS_Datetime', |
||
24 | 'BuildQueued' => 'Boolean', |
||
25 | // Module rating information |
||
26 | 'Rating' => 'Int', |
||
27 | 'RatingDetails' => 'Text', |
||
28 | ); |
||
29 | |||
30 | public static $has_one = array( |
||
31 | 'Vendor' => 'AddonVendor', |
||
32 | ); |
||
33 | |||
34 | public static $has_many = array( |
||
35 | 'Versions' => 'AddonVersion' |
||
36 | ); |
||
37 | |||
38 | public static $many_many = array( |
||
39 | 'Keywords' => 'AddonKeyword', |
||
40 | 'Screenshots' => 'Image', |
||
41 | 'CompatibleVersions' => 'SilverStripeVersion' |
||
42 | ); |
||
43 | |||
44 | public static $default_sort = 'Name'; |
||
45 | |||
46 | public static $extensions = array( |
||
47 | 'SilverStripe\\Elastica\\Searchable' |
||
48 | ); |
||
49 | |||
50 | /** |
||
51 | * Gets the addon's versions sorted from newest to oldest. |
||
52 | * |
||
53 | * @return ArrayList |
||
54 | */ |
||
55 | public function SortedVersions() |
||
65 | |||
66 | public function MasterVersion() |
||
70 | |||
71 | public function Authors() |
||
75 | |||
76 | public function VendorName() |
||
80 | |||
81 | public function VendorLink() |
||
89 | |||
90 | public function PackageName() |
||
94 | |||
95 | public function Link() |
||
103 | |||
104 | public function DescriptionText() |
||
108 | |||
109 | public function RSSTitle() |
||
113 | |||
114 | public function PackagistUrl() |
||
118 | |||
119 | public function getElasticaMapping() |
||
133 | |||
134 | public function getElasticaDocument() |
||
148 | |||
149 | public function onBeforeDelete() |
||
167 | |||
168 | public function getDateCreated() |
||
172 | |||
173 | /** |
||
174 | * Returns unserialised result data from the ratings check suite |
||
175 | * |
||
176 | * {@see \SilverStripe\ModuleRatings\CheckSuite} |
||
177 | * |
||
178 | * @return ArrayData |
||
179 | */ |
||
180 | public function RatingData() |
||
187 | |||
188 | /** |
||
189 | * Returns a list of whether rating metrics have passed for this addon, and a description of the metric |
||
190 | * |
||
191 | * @return ArrayList |
||
192 | */ |
||
193 | public function RatingDescriptions() |
||
212 | |||
213 | |||
214 | |||
215 | /** |
||
216 | * |
||
217 | * @return bool|DateInterval |
||
218 | */ |
||
219 | public function addonAge() |
||
226 | |||
227 | /** |
||
228 | * Calculate the total amount of downloads per day |
||
229 | * Based on the total amount of downloads divided by the age of the addon |
||
230 | * |
||
231 | * @return float |
||
232 | */ |
||
233 | public function getRelativePopularity() |
||
237 | |||
238 | /** |
||
239 | * Format the relative popularity to a nicely readable number |
||
240 | * |
||
241 | * @return string |
||
242 | */ |
||
243 | public function relativePopularityFormatted() |
||
247 | } |
||
248 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.