Total Complexity | 57 |
Total Lines | 555 |
Duplicated Lines | 0 % |
Changes | 0 |
Complex classes like LanguageModinfo often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use LanguageModinfo, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
33 | class LanguageModinfo extends Files\CreateFile |
||
34 | { |
||
35 | /** |
||
36 | * @var mixed |
||
37 | */ |
||
38 | private $ld = null; |
||
39 | |||
40 | /** |
||
41 | * @var mixed |
||
42 | */ |
||
43 | private $pc = null; |
||
44 | |||
45 | /** |
||
46 | * @public function constructor |
||
47 | * @param null |
||
48 | */ |
||
49 | public function __construct() |
||
50 | { |
||
51 | parent::__construct(); |
||
52 | $this->ld = LanguageDefines::getInstance(); |
||
53 | $this->pc = Modulebuilder\Files\CreatePhpCode::getInstance(); |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @static function getInstance |
||
58 | * @param null |
||
59 | * @return LanguageModinfo |
||
60 | */ |
||
61 | public static function getInstance() |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * @public function write |
||
73 | * |
||
74 | * @param $module |
||
75 | * @param $table |
||
76 | * @param $filename |
||
77 | * |
||
78 | * @return null |
||
79 | */ |
||
80 | public function write($module, $table, $filename) |
||
81 | { |
||
82 | $this->setModule($module); |
||
83 | $this->setTable($table); |
||
84 | $this->setFileName($filename); |
||
85 | |||
86 | return null; |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * @private function getLanguageMain |
||
91 | * |
||
92 | * @param $language |
||
93 | * @param $module |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | private function getLanguageMain($language, $module) |
||
98 | { |
||
99 | $ret = $this->ld->getBlankLine(); |
||
100 | $ret .= $this->pc->getPhpCodeIncludeDir('__DIR__','common', true); |
||
101 | $ret .= $this->ld->getBlankLine(); |
||
102 | $ret .= $this->ld->getAboveHeadDefines('Admin Main'); |
||
103 | $ret .= $this->ld->getDefine($language, 'NAME', (string)$module->getVar('mod_name')); |
||
104 | $ret .= $this->ld->getDefine($language, 'DESC', (string)$module->getVar('mod_description')); |
||
105 | |||
106 | return $ret; |
||
107 | } |
||
108 | |||
109 | /** |
||
110 | * @private function getLanguageMenu |
||
111 | * |
||
112 | * @param $module |
||
113 | * @param $language |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | private function getLanguageMenu($module, $language) |
||
148 | } |
||
149 | |||
150 | /** |
||
151 | * @private function getLanguageAdmin |
||
152 | * @param $language |
||
153 | * |
||
154 | * @return string |
||
155 | */ |
||
156 | private function getLanguageAdmin($language) |
||
163 | } |
||
164 | |||
165 | /** |
||
166 | * @private function getLanguageSubmenu |
||
167 | * @param $language |
||
168 | * @param array $tables |
||
169 | * |
||
170 | * @return string |
||
171 | */ |
||
172 | private function getLanguageSubmenu($language, $tables) |
||
199 | } |
||
200 | |||
201 | /** |
||
202 | * @private function getLanguageBlocks |
||
203 | * @param $language |
||
204 | * @param array $tables |
||
205 | * |
||
206 | * @return string |
||
207 | */ |
||
208 | private function getLanguageBlocks($tables, $language) |
||
209 | { |
||
210 | $ret = $this->ld->getAboveDefines('Blocks'); |
||
211 | foreach (\array_keys($tables) as $i) { |
||
212 | if (1 == $tables[$i]->getVar('table_blocks')) { |
||
213 | $tableName = $tables[$i]->getVar('table_name'); |
||
214 | $stuTableName = \mb_strtoupper($tableName); |
||
215 | $tableSoleName = $tables[$i]->getVar('table_solename'); |
||
216 | $stuTableSoleName = \mb_strtoupper($tableSoleName); |
||
217 | $ucfTableName = \ucfirst($tableName); |
||
218 | $ucfTableSoleName = \ucfirst($stuTableSoleName); |
||
219 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK", "{$ucfTableName} block"); |
||
220 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_DESC", "{$ucfTableName} block description"); |
||
221 | if (1 == $tables[$i]->getVar('table_category')) { |
||
222 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}", "{$ucfTableName} block {$ucfTableSoleName}"); |
||
223 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}_DESC", "{$ucfTableName} block {$ucfTableSoleName} description"); |
||
224 | } else { |
||
225 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}", "{$ucfTableName} block {$ucfTableSoleName}"); |
||
226 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_{$stuTableSoleName}_DESC", "{$ucfTableName} block {$ucfTableSoleName} description"); |
||
227 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_LAST", "{$ucfTableName} block last"); |
||
228 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_LAST_DESC", "{$ucfTableName} block last description"); |
||
229 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_NEW", "{$ucfTableName} block new"); |
||
230 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_NEW_DESC", "{$ucfTableName} block new description"); |
||
231 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_HITS", "{$ucfTableName} block hits"); |
||
232 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_HITS_DESC", "{$ucfTableName} block hits description"); |
||
233 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_TOP", "{$ucfTableName} block top"); |
||
234 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_TOP_DESC", "{$ucfTableName} block top description"); |
||
235 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_RANDOM", "{$ucfTableName} block random"); |
||
236 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_RANDOM_DESC", "{$ucfTableName} block random description"); |
||
237 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_SPOTLIGHT", "{$ucfTableName} block spotlight"); |
||
238 | $ret .= $this->ld->getDefine($language, "{$stuTableName}_BLOCK_SPOTLIGHT_DESC", "{$ucfTableName} block spotlight description"); |
||
239 | } |
||
240 | } |
||
241 | } |
||
242 | |||
243 | return $ret; |
||
244 | } |
||
245 | |||
246 | /** |
||
247 | * @private function getLanguageUser |
||
248 | * @param $language |
||
249 | * |
||
250 | * @return string |
||
251 | */ |
||
252 | private function getLanguageUser($language) |
||
253 | { |
||
254 | $ret = $this->ld->getAboveDefines('User'); |
||
255 | $ret .= $this->ld->getDefine($language, 'USER_PAGER', 'User pager'); |
||
256 | $ret .= $this->ld->getDefine($language, 'USER_PAGER_DESC', 'User per page list'); |
||
257 | |||
258 | return $ret; |
||
259 | } |
||
260 | |||
261 | /** |
||
262 | * @private function getLanguageConfig |
||
263 | * @param $language |
||
264 | * @param $tables |
||
265 | * |
||
266 | * @return string |
||
267 | */ |
||
268 | private function getLanguageConfig($language, $tables) |
||
269 | { |
||
270 | $ret = $this->ld->getAboveDefines('Config'); |
||
271 | $fieldImage = false; |
||
272 | $fieldFile = false; |
||
273 | $useTag = false; |
||
274 | $fieldEditor = false; |
||
275 | // $usePermissions = false; |
||
276 | foreach (\array_keys($tables) as $i) { |
||
277 | $fields = $this->getTableFields($tables[$i]->getVar('table_mid'), $tables[$i]->getVar('table_id')); |
||
278 | foreach (\array_keys($fields) as $f) { |
||
279 | $fieldElement = $fields[$f]->getVar('field_element'); |
||
280 | if (3 == $fieldElement) { |
||
281 | $fieldEditor = true; |
||
282 | } |
||
283 | if (4 == $fieldElement) { |
||
284 | $fieldEditor = true; |
||
285 | } |
||
286 | if (10 == $fieldElement) { |
||
287 | $fieldImage = true; |
||
288 | } |
||
289 | if (13 == $fieldElement) { |
||
290 | $fieldImage = true; |
||
291 | } |
||
292 | if (14 == $fieldElement) { |
||
293 | $fieldFile = true; |
||
294 | } |
||
295 | } |
||
296 | if (0 != $tables[$i]->getVar('table_tag')) { |
||
297 | $useTag = true; |
||
298 | } |
||
299 | } |
||
300 | if ($fieldEditor) { |
||
301 | $ret .= $this->ld->getDefine($language, 'EDITOR_ADMIN', 'Editor admin'); |
||
302 | $ret .= $this->ld->getDefine($language, 'EDITOR_ADMIN_DESC', 'Select the editor which should be used in admin area for text area fields'); |
||
303 | $ret .= $this->ld->getDefine($language, 'EDITOR_USER', 'Editor user'); |
||
304 | $ret .= $this->ld->getDefine($language, 'EDITOR_USER_DESC', 'Select the editor which should be used in user area for text area fields'); |
||
305 | $ret .= $this->ld->getDefine($language, 'EDITOR_MAXCHAR', 'Text max characters'); |
||
306 | $ret .= $this->ld->getDefine($language, 'EDITOR_MAXCHAR_DESC', 'Max characters for showing text of a textarea or editor field in admin area'); |
||
307 | } |
||
308 | $ret .= $this->ld->getDefine($language, 'KEYWORDS', 'Keywords'); |
||
309 | $ret .= $this->ld->getDefine($language, 'KEYWORDS_DESC', 'Insert here the keywords (separate by comma)'); |
||
310 | |||
311 | if ($fieldImage || $fieldFile) { |
||
312 | $ret .= $this->ld->getDefine($language, 'SIZE_MB', 'MB'); |
||
313 | } |
||
314 | if ($fieldImage) { |
||
315 | $ret .= $this->ld->getDefine($language, 'MAXSIZE_IMAGE', 'Max size image'); |
||
316 | $ret .= $this->ld->getDefine($language, 'MAXSIZE_IMAGE_DESC', 'Define the max size for uploading images'); |
||
317 | $ret .= $this->ld->getDefine($language, 'MIMETYPES_IMAGE', 'Mime types image'); |
||
318 | $ret .= $this->ld->getDefine($language, 'MIMETYPES_IMAGE_DESC', 'Define the allowed mime types for uploading images'); |
||
319 | $ret .= $this->ld->getDefine($language, 'MAXWIDTH_IMAGE', 'Max width image'); |
||
320 | $ret .= $this->ld->getDefine($language, 'MAXWIDTH_IMAGE_DESC', 'Set the max width to which uploaded images should be scaled (in pixel)<br>0 means, that images keeps the original size. <br>If an image is smaller than maximum value then the image will be not enlarge, it will be save in original width.'); |
||
321 | $ret .= $this->ld->getDefine($language, 'MAXHEIGHT_IMAGE', 'Max height image'); |
||
322 | $ret .= $this->ld->getDefine($language, 'MAXHEIGHT_IMAGE_DESC', 'Set the max height to which uploaded images should be scaled (in pixel)<br>0 means, that images keeps the original size. <br>If an image is smaller than maximum value then the image will be not enlarge, it will be save in original height'); |
||
323 | } |
||
324 | if ($fieldFile) { |
||
325 | $ret .= $this->ld->getDefine($language, 'MAXSIZE_FILE', 'Max size file'); |
||
326 | $ret .= $this->ld->getDefine($language, 'MAXSIZE_FILE_DESC', 'Define the max size for uploading files'); |
||
327 | $ret .= $this->ld->getDefine($language, 'MIMETYPES_FILE', 'Mime types file'); |
||
328 | $ret .= $this->ld->getDefine($language, 'MIMETYPES_FILE_DESC', 'Define the allowed mime types for uploading files'); |
||
329 | } |
||
330 | if ($useTag) { |
||
331 | $ret .= $this->ld->getDefine($language, 'USE_TAG', 'Use TAG'); |
||
332 | $ret .= $this->ld->getDefine($language, 'USE_TAG_DESC', 'If you use tag module, check this option to yes'); |
||
333 | } |
||
334 | $getDefinesConf = [ |
||
335 | 'NUMB_COL' => 'Number Columns', |
||
336 | 'NUMB_COL_DESC' => 'Number Columns to View', |
||
337 | 'DIVIDEBY' => 'Divide By', |
||
338 | 'DIVIDEBY_DESC' => 'Divide by columns number', |
||
339 | 'TABLE_TYPE' => 'Table Type', |
||
340 | 'TABLE_TYPE_DESC' => 'Table Type is the bootstrap html table', |
||
341 | 'PANEL_TYPE' => 'Panel Type', |
||
342 | 'PANEL_TYPE_DESC' => 'Panel Type is the bootstrap html div', |
||
343 | 'IDPAYPAL' => 'Paypal ID', |
||
344 | 'IDPAYPAL_DESC' => 'Insert here your PayPal ID for donations', |
||
345 | 'SHOW_BREADCRUMBS' => 'Show breadcrumb navigation', |
||
346 | 'SHOW_BREADCRUMBS_DESC' => 'Show breadcrumb navigation which displays the current page in context within the site structure', |
||
347 | 'ADVERTISE' => 'Advertisement Code', |
||
348 | 'ADVERTISE_DESC' => 'Insert here the advertisement code', |
||
349 | 'MAINTAINEDBY' => 'Maintained By', |
||
350 | 'MAINTAINEDBY_DESC' => 'Allow url of support site or community', |
||
351 | 'BOOKMARKS' => 'Social Bookmarks', |
||
352 | 'BOOKMARKS_DESC' => 'Show Social Bookmarks in the single page', |
||
353 | //'FACEBOOK_COMMENTS' => 'Facebook comments', |
||
354 | //'FACEBOOK_COMMENTS_DESC' => 'Allow Facebook comments in the single page', |
||
355 | //'DISQUS_COMMENTS' => 'Disqus comments', |
||
356 | //'DISQUS_COMMENTS_DESC' => 'Allow Disqus comments in the single page', |
||
357 | ]; |
||
358 | foreach ($getDefinesConf as $defc => $descc) { |
||
359 | $ret .= $this->ld->getDefine($language, $defc, $descc); |
||
360 | } |
||
361 | |||
362 | return $ret; |
||
363 | } |
||
364 | |||
365 | /** |
||
366 | * @private function getLanguageNotificationsGlobal |
||
367 | * @param $language |
||
368 | * @param $tableBroken |
||
369 | * @param $tableComment |
||
370 | * @return string |
||
371 | */ |
||
372 | private function getLanguageNotificationsGlobal($language, $tableBroken, $tableComment) |
||
373 | { |
||
374 | $ret = $this->ld->getAboveDefines('Global notifications'); |
||
375 | $getDefinesNotif = [ |
||
376 | 'NOTIFY_GLOBAL' => 'Global notification', |
||
377 | 'NOTIFY_GLOBAL_NEW' => 'Any new item', |
||
378 | 'NOTIFY_GLOBAL_NEW_CAPTION' => 'Notify me about any new item', |
||
379 | 'NOTIFY_GLOBAL_NEW_SUBJECT' => 'Notification about new item', |
||
380 | 'NOTIFY_GLOBAL_MODIFY' => 'Any modified item', |
||
381 | 'NOTIFY_GLOBAL_MODIFY_CAPTION' => 'Notify me about any item modification', |
||
382 | 'NOTIFY_GLOBAL_MODIFY_SUBJECT' => 'Notification about modification', |
||
383 | 'NOTIFY_GLOBAL_DELETE' => 'Any deleted item', |
||
384 | 'NOTIFY_GLOBAL_DELETE_CAPTION' => 'Notify me about any deleted item', |
||
385 | 'NOTIFY_GLOBAL_DELETE_SUBJECT' => 'Notification about deleted item', |
||
386 | 'NOTIFY_GLOBAL_APPROVE' => 'Any item to approve', |
||
387 | 'NOTIFY_GLOBAL_APPROVE_CAPTION' => 'Notify me about any item waiting for approvement', |
||
388 | 'NOTIFY_GLOBAL_APPROVE_SUBJECT' => 'Notification about item waiting for approvement', |
||
389 | //'CATEGORY_NOTIFY' => 'Category notification', |
||
390 | //'CATEGORY_NOTIFY_DESC' => 'Category notification desc', |
||
391 | //'CATEGORY_NOTIFY_CAPTION' => 'Category notification caption', |
||
392 | //'CATEGORY_NOTIFY_SUBJECT' => 'Category notification Subject', |
||
393 | //'CATEGORY_SUBMIT_NOTIFY' => 'Category submit notification', |
||
394 | //'CATEGORY_SUBMIT_NOTIFY_CAPTION' => 'Category submit notification caption', |
||
395 | //'CATEGORY_SUBMIT_NOTIFY_DESC' => 'Category submit notification desc', |
||
396 | //'CATEGORY_SUBMIT_NOTIFY_SUBJECT' => 'Category submit notification subject', |
||
397 | ]; |
||
398 | if ($tableBroken) { |
||
399 | $getDefinesNotif['NOTIFY_GLOBAL_BROKEN'] = 'Any broken item'; |
||
400 | $getDefinesNotif['NOTIFY_GLOBAL_BROKEN_CAPTION'] = 'Notify me about any broken item'; |
||
401 | $getDefinesNotif['NOTIFY_GLOBAL_BROKEN_SUBJECT'] = 'Notification about broken item'; |
||
402 | } |
||
403 | if ($tableComment) { |
||
404 | $getDefinesNotif['NOTIFY_GLOBAL_COMMENT'] = 'Any comments'; |
||
405 | $getDefinesNotif['NOTIFY_GLOBAL_COMMENT_CAPTION'] = 'Notify me about any comment'; |
||
406 | $getDefinesNotif['NOTIFY_GLOBAL_COMMENT_SUBJECT'] = 'Notification about any comment'; |
||
407 | } |
||
408 | foreach ($getDefinesNotif as $defn => $descn) { |
||
409 | $ret .= $this->ld->getDefine($language, $defn, $descn); |
||
410 | } |
||
411 | |||
412 | return $ret; |
||
413 | } |
||
414 | |||
415 | /** |
||
416 | * @private function getLanguageNotificationsTable |
||
417 | * @param $language |
||
418 | * @param $tableName |
||
419 | * @param mixed $tableSoleName |
||
420 | * |
||
421 | * @param $tableBroken |
||
422 | * @param $tableComment |
||
423 | * @return string |
||
424 | */ |
||
425 | private function getLanguageNotificationsTable($language, $tableName, $tableSoleName, $tableBroken, $tableComment) |
||
426 | { |
||
427 | $stuTableSoleName = \mb_strtoupper($tableSoleName); |
||
428 | $ucfTableSoleName = \ucfirst($tableSoleName); |
||
429 | $ret = $this->ld->getAboveDefines($ucfTableSoleName . ' notifications'); |
||
430 | $getDefinesNotif = [ |
||
431 | 'NOTIFY_' . $stuTableSoleName => $ucfTableSoleName . ' notification', |
||
432 | 'NOTIFY_' . $stuTableSoleName . '_MODIFY' => "{$ucfTableSoleName} modification", |
||
433 | 'NOTIFY_' . $stuTableSoleName . '_MODIFY_CAPTION' => "Notify me about {$tableSoleName} modification", |
||
434 | 'NOTIFY_' . $stuTableSoleName . '_MODIFY_SUBJECT' => "Notification about modification", |
||
435 | 'NOTIFY_' . $stuTableSoleName . '_DELETE' => "{$ucfTableSoleName} deleted", |
||
436 | 'NOTIFY_' . $stuTableSoleName . '_DELETE_CAPTION' => "Notify me about deleted {$tableName}", |
||
437 | 'NOTIFY_' . $stuTableSoleName . '_DELETE_SUBJECT' => "Notification delete {$tableSoleName}", |
||
438 | 'NOTIFY_' . $stuTableSoleName . '_APPROVE' => "{$ucfTableSoleName} approve", |
||
439 | 'NOTIFY_' . $stuTableSoleName . '_APPROVE_CAPTION' => "Notify me about {$tableName} waiting for approvement", |
||
440 | 'NOTIFY_' . $stuTableSoleName . '_APPROVE_SUBJECT' => "Notification {$tableSoleName} waiting for approvement", |
||
441 | ]; |
||
442 | if (1 == $tableBroken) { |
||
443 | $getDefinesNotif['NOTIFY_' . $stuTableSoleName . '_BROKEN'] = "{$ucfTableSoleName} broken"; |
||
444 | $getDefinesNotif['NOTIFY_' . $stuTableSoleName . '_BROKEN_CAPTION'] = "Notify me about broken {$tableSoleName}"; |
||
445 | $getDefinesNotif['NOTIFY_' . $stuTableSoleName . '_BROKEN_SUBJECT'] = "Notification about broken {$tableSoleName}"; |
||
446 | } |
||
447 | if (1 == $tableComment) { |
||
448 | $getDefinesNotif['NOTIFY_' . $stuTableSoleName . '_COMMENT'] = "{$ucfTableSoleName} comment"; |
||
449 | $getDefinesNotif['NOTIFY_' . $stuTableSoleName . '_COMMENT_CAPTION'] = "Notify me about comments for {$tableSoleName}"; |
||
450 | $getDefinesNotif['NOTIFY_' . $stuTableSoleName . '_COMMENT_SUBJECT'] = "Notification about comments for {$tableSoleName}"; |
||
451 | } |
||
452 | foreach ($getDefinesNotif as $defn => $descn) { |
||
453 | $ret .= $this->ld->getDefine($language, $defn, $descn); |
||
454 | } |
||
455 | |||
456 | return $ret; |
||
457 | } |
||
458 | |||
459 | /** |
||
460 | * @private function getLanguagePermissionsGroups |
||
461 | * @param $language |
||
462 | * |
||
463 | * @return string |
||
464 | */ |
||
465 | private function getLanguagePermissionsGroups($language) |
||
466 | { |
||
467 | $ret = $this->ld->getAboveDefines('Permissions Groups'); |
||
468 | $ret .= $this->ld->getDefine($language, 'GROUPS', 'Groups access'); |
||
469 | $ret .= $this->ld->getDefine($language, 'GROUPS_DESC', 'Select general access permission for groups.'); |
||
470 | $ret .= $this->ld->getDefine($language, 'ADMIN_GROUPS', 'Admin Group Permissions'); |
||
471 | $ret .= $this->ld->getDefine($language, 'ADMIN_GROUPS_DESC', 'Which groups have access to tools and permissions page'); |
||
472 | $ret .= $this->ld->getDefine($language, 'UPLOAD_GROUPS', 'Upload Group Permissions'); |
||
473 | $ret .= $this->ld->getDefine($language, 'UPLOAD_GROUPS_DESC', 'Which groups have permissions to upload files'); |
||
474 | |||
475 | return $ret; |
||
476 | } |
||
477 | |||
478 | |||
479 | /** |
||
480 | * @private function getLanguagePermissionsGroups |
||
481 | * @param $language |
||
482 | * |
||
483 | * @return string |
||
484 | */ |
||
485 | private function getLanguageRatingbars($language) |
||
486 | { |
||
487 | $ret = $this->ld->getAboveDefines('Rating bars'); |
||
488 | $ret .= $this->ld->getDefine($language, 'RATINGBAR_GROUPS', 'Groups with rating rights'); |
||
489 | $ret .= $this->ld->getDefine($language, 'RATINGBAR_GROUPS_DESC', 'Select groups which should have the right to rate'); |
||
490 | $ret .= $this->ld->getDefine($language, 'RATINGBARS', 'Allow rating'); |
||
491 | $ret .= $this->ld->getDefine($language, 'RATINGBARS_DESC', 'Define whether rating should be possible and which kind of rating should be used'); |
||
492 | $ret .= $this->ld->getDefine($language, 'RATING_NONE', 'Do not use rating'); |
||
493 | $ret .= $this->ld->getDefine($language, 'RATING_5STARS', 'Rating with 5 stars'); |
||
494 | $ret .= $this->ld->getDefine($language, 'RATING_10STARS', 'Rating with 10 stars'); |
||
495 | $ret .= $this->ld->getDefine($language, 'RATING_LIKES', 'Rating with likes and dislikes'); |
||
496 | $ret .= $this->ld->getDefine($language, 'RATING_10NUM', 'Rating with 10 points'); |
||
497 | |||
498 | return $ret; |
||
499 | } |
||
500 | |||
501 | /** |
||
502 | * @private function getFooter |
||
503 | * @param null |
||
504 | * @return string |
||
505 | */ |
||
506 | private function getLanguageFooter() |
||
507 | { |
||
508 | $ret = $this->ld->getBelowDefines('End'); |
||
509 | $ret .= $this->ld->getBlankLine(); |
||
510 | |||
511 | return $ret; |
||
512 | } |
||
513 | |||
514 | /** |
||
515 | * @public function render |
||
516 | * @param null |
||
517 | * @return bool|string |
||
518 | */ |
||
519 | public function render() |
||
588 | } |
||
589 | } |
||
590 |