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