| Total Complexity | 102 |
| Total Lines | 705 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Complex classes like AppPlugin 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 AppPlugin, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 11 | class AppPlugin |
||
| 12 | { |
||
| 13 | public $plugin_regions = [ |
||
| 14 | 'main_top', |
||
| 15 | 'main_bottom', |
||
| 16 | 'login_top', |
||
| 17 | 'login_bottom', |
||
| 18 | 'menu_top', |
||
| 19 | 'menu_bottom', |
||
| 20 | 'content_top', |
||
| 21 | 'content_bottom', |
||
| 22 | 'header_main', |
||
| 23 | 'header_center', |
||
| 24 | 'header_left', |
||
| 25 | 'header_right', |
||
| 26 | 'pre_footer', |
||
| 27 | 'footer_left', |
||
| 28 | 'footer_center', |
||
| 29 | 'footer_right', |
||
| 30 | 'menu_administrator', |
||
| 31 | 'course_tool_plugin', |
||
| 32 | ]; |
||
| 33 | |||
| 34 | public $installedPluginListName = []; |
||
| 35 | public $installedPluginListObject = []; |
||
| 36 | private static $instance; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Constructor. |
||
| 40 | */ |
||
| 41 | public function __construct() |
||
| 42 | { |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return AppPlugin |
||
| 47 | */ |
||
| 48 | public static function getInstance() |
||
| 49 | { |
||
| 50 | if (!isset(self::$instance)) { |
||
| 51 | self::$instance = new self(); |
||
| 52 | } |
||
| 53 | |||
| 54 | return self::$instance; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Read plugin from path. |
||
| 59 | */ |
||
| 60 | public function read_plugins_from_path(): array |
||
| 61 | { |
||
| 62 | /* We scan the plugin directory. Each folder is a potential plugin. */ |
||
| 63 | $pluginPath = api_get_path(SYS_PLUGIN_PATH); |
||
| 64 | $finder = (new Finder())->directories()->depth('== 0')->sortByName()->in($pluginPath); |
||
| 65 | |||
| 66 | $plugins = []; |
||
| 67 | |||
| 68 | foreach ($finder as $file) { |
||
| 69 | $plugins[] = $file->getFilename(); |
||
| 70 | } |
||
| 71 | |||
| 72 | return $plugins; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return array |
||
| 77 | */ |
||
| 78 | public function getInstalledPluginListName() |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return array List of Plugin |
||
| 89 | */ |
||
| 90 | public function getInstalledPluginListObject() |
||
| 91 | { |
||
| 92 | if (empty($this->installedPluginListObject)) { |
||
| 93 | $this->setInstalledPluginListObject(); |
||
| 94 | } |
||
| 95 | |||
| 96 | return $this->installedPluginListObject; |
||
| 97 | } |
||
| 98 | |||
| 99 | public function setInstalledPluginListObject() |
||
| 112 | } |
||
| 113 | |||
| 114 | /** |
||
| 115 | * @param string $plugin |
||
| 116 | * |
||
| 117 | * @return bool |
||
| 118 | */ |
||
| 119 | public function isInstalled($plugin) |
||
| 124 | } |
||
| 125 | |||
| 126 | public function getInstalledPlugins(bool $fromDatabase = true): array |
||
| 127 | { |
||
| 128 | static $installedPlugins = null; |
||
| 129 | |||
| 130 | if (false === $fromDatabase && is_array($installedPlugins)) { |
||
| 131 | return $installedPlugins; |
||
| 132 | } |
||
| 133 | |||
| 134 | if ($fromDatabase || null === $installedPlugins) { |
||
| 135 | $installedPlugins = []; |
||
| 136 | |||
| 137 | $plugins = Container::getPluginRepository()->getInstalledPlugins(); |
||
| 138 | |||
| 139 | foreach ($plugins as $plugin) { |
||
| 140 | $installedPlugins[] = $plugin->getTitle(); |
||
| 141 | } |
||
| 142 | } |
||
| 143 | |||
| 144 | return $installedPlugins; |
||
| 145 | } |
||
| 146 | |||
| 147 | public function getInstalledPluginsInCurrentUrl() |
||
| 148 | { |
||
| 149 | $installedPlugins = []; |
||
| 150 | $urlId = api_get_current_access_url_id(); |
||
| 151 | $plugins = api_get_settings_params( |
||
| 152 | [ |
||
| 153 | 'variable = ? AND selected_value = ? AND category = ? AND access_url = ?' => ['status', 'installed', 'Plugins', $urlId], |
||
| 154 | ] |
||
| 155 | ); |
||
| 156 | |||
| 157 | if (!empty($plugins)) { |
||
| 158 | foreach ($plugins as $row) { |
||
| 159 | $installedPlugins[$row['subkey']] = true; |
||
| 160 | } |
||
| 161 | $installedPlugins = array_keys($installedPlugins); |
||
| 162 | } |
||
| 163 | |||
| 164 | return $installedPlugins; |
||
| 165 | } |
||
| 166 | |||
| 167 | /** |
||
| 168 | * Returns a list of all official (delivered with the Chamilo package) |
||
| 169 | * plugins. This list is maintained manually and updated with every new |
||
| 170 | * release to avoid hacking. |
||
| 171 | * |
||
| 172 | * @return array |
||
| 173 | */ |
||
| 174 | public static function getOfficialPlugins(): array |
||
| 175 | { |
||
| 176 | // Please keep this list alphabetically sorted |
||
| 177 | return [ |
||
| 178 | 'AzureActiveDirectory', |
||
| 179 | 'Bbb', |
||
| 180 | 'BeforeLogin', |
||
| 181 | 'BuyCourses', |
||
| 182 | 'CardGame', |
||
| 183 | 'CheckExtraFieldAuthorCompany', |
||
| 184 | 'CleanDeletedFiles', |
||
| 185 | 'CourseBlock', |
||
| 186 | 'CourseHomeNotify', |
||
| 187 | 'CourseLegal', |
||
| 188 | 'CustomCertificate', |
||
| 189 | 'CustomFooter', |
||
| 190 | 'Dashboard', |
||
| 191 | 'Dictionary', |
||
| 192 | 'EmbedRegistry', |
||
| 193 | 'ExerciseSignature', |
||
| 194 | 'ExtAuthChamiloLogoutButtonBehaviour', |
||
| 195 | 'ExternalNotificationConnect', |
||
| 196 | 'ExtraMenuFromWebservice', |
||
| 197 | 'GoogleMaps', |
||
| 198 | 'GradingElectronic', |
||
| 199 | 'H5pImport', |
||
| 200 | 'HelloWorld', |
||
| 201 | 'ImsLti', |
||
| 202 | 'Justification', |
||
| 203 | 'LearningCalendar', |
||
| 204 | 'LtiProvider', |
||
| 205 | 'MaintenanceMode', |
||
| 206 | 'MigrationMoodle', |
||
| 207 | 'Mobidico', |
||
| 208 | 'NoSearchIndex', |
||
| 209 | 'NotebookTeacher', |
||
| 210 | 'PauseTraining', |
||
| 211 | 'Pens', |
||
| 212 | 'Positioning', |
||
| 213 | 'QuestionOptionsEvaluation', |
||
| 214 | 'Redirection', |
||
| 215 | 'Resubscription', |
||
| 216 | 'Rss', |
||
| 217 | 'SearchCourse', |
||
| 218 | 'ShowRegions', |
||
| 219 | 'ShowUserInfo', |
||
| 220 | 'Static', |
||
| 221 | 'StudentFollowUp', |
||
| 222 | 'SurveyExportCsv', |
||
| 223 | 'SurveyExportTxt', |
||
| 224 | 'Test2Pdf', |
||
| 225 | 'TopLinks', |
||
| 226 | 'Tour', |
||
| 227 | 'UserRemoteService', |
||
| 228 | 'XApi', |
||
| 229 | 'Zoom', |
||
| 230 | ]; |
||
| 231 | } |
||
| 232 | |||
| 233 | public static function isOfficial(string $title): bool |
||
| 236 | } |
||
| 237 | |||
| 238 | public function install(string $pluginName): void |
||
| 239 | { |
||
| 240 | $pluginPath = api_get_path(SYS_PLUGIN_PATH).$pluginName.'/install.php'; |
||
| 241 | |||
| 242 | if (is_file($pluginPath) && is_readable($pluginPath)) { |
||
| 243 | // Execute the install procedure. |
||
| 244 | |||
| 245 | require $pluginPath; |
||
| 246 | } |
||
| 247 | } |
||
| 248 | |||
| 249 | public function uninstall(string $pluginName): void |
||
| 250 | { |
||
| 251 | // First call the custom uninstallation to allow full access to global settings |
||
| 252 | $pluginPath = api_get_path(SYS_PLUGIN_PATH).$pluginName.'/uninstall.php'; |
||
| 253 | if (is_file($pluginPath) && is_readable($pluginPath)) { |
||
| 254 | // Execute the uninstall procedure. |
||
| 255 | |||
| 256 | require $pluginPath; |
||
| 257 | } |
||
| 258 | } |
||
| 259 | |||
| 260 | /** |
||
| 261 | * @param string $pluginName |
||
| 262 | * |
||
| 263 | * @return array |
||
| 264 | */ |
||
| 265 | public function get_areas_by_plugin($pluginName) |
||
| 276 | } |
||
| 277 | |||
| 278 | /** |
||
| 279 | * @param string $pluginName |
||
| 280 | * |
||
| 281 | * @return bool |
||
| 282 | */ |
||
| 283 | public function is_valid_plugin($pluginName) |
||
| 284 | { |
||
| 285 | if (is_dir(api_get_path(SYS_PLUGIN_PATH).$pluginName)) { |
||
| 286 | if (is_file(api_get_path(SYS_PLUGIN_PATH).$pluginName.'/index.php')) { |
||
| 287 | return true; |
||
| 288 | } |
||
| 289 | } |
||
| 290 | |||
| 291 | return false; |
||
| 292 | } |
||
| 293 | |||
| 294 | /** |
||
| 295 | * @return array |
||
| 296 | */ |
||
| 297 | public function getPluginRegions() |
||
| 298 | { |
||
| 299 | sort($this->plugin_regions); |
||
| 300 | |||
| 301 | return $this->plugin_regions; |
||
| 302 | } |
||
| 303 | |||
| 304 | /** |
||
| 305 | * @param string $region |
||
| 306 | * @param Twig_Environment $template |
||
| 307 | * @param bool $forced |
||
| 308 | * |
||
| 309 | * @return string|null |
||
| 310 | */ |
||
| 311 | public function loadRegion($pluginName, $region, $template, $forced = false) |
||
| 312 | { |
||
| 313 | if ('course_tool_plugin' == $region) { |
||
| 314 | return ''; |
||
| 315 | } |
||
| 316 | |||
| 317 | ob_start(); |
||
| 318 | $this->getAllPluginContentsByRegion($pluginName, $region, $template, $forced); |
||
| 319 | $content = ob_get_contents(); |
||
| 320 | ob_end_clean(); |
||
| 321 | |||
| 322 | return $content; |
||
| 323 | } |
||
| 324 | |||
| 325 | /** |
||
| 326 | * Loads the translation files inside a plugin if exists. |
||
| 327 | * It loads by default english see the hello world plugin. |
||
| 328 | * |
||
| 329 | * @param string $plugin_name |
||
| 330 | * |
||
| 331 | * @todo add caching |
||
| 332 | */ |
||
| 333 | public function load_plugin_lang_variables($plugin_name) |
||
| 360 | /*$interfaceLanguageId = api_get_language_id($language_interface); |
||
| 361 | $interfaceLanguageInfo = api_get_language_info($interfaceLanguageId); |
||
| 362 | $languageParentId = intval($interfaceLanguageInfo['parent_id']); |
||
| 363 | |||
| 364 | if ($languageParentId > 0) { |
||
| 365 | $languageParentInfo = api_get_language_info($languageParentId); |
||
| 366 | $languageParentFolder = $languageParentInfo['dokeos_folder']; |
||
| 367 | |||
| 368 | $parentPath = "{$root}{$plugin_name}/lang/{$languageParentFolder}.php"; |
||
| 369 | if (is_readable($parentPath)) { |
||
| 370 | include $parentPath; |
||
| 371 | if (!empty($strings)) { |
||
| 372 | foreach ($strings as $key => $string) { |
||
| 373 | $this->strings[$key] = $string; |
||
| 374 | } |
||
| 375 | } |
||
| 376 | } |
||
| 377 | }*/ |
||
| 378 | } |
||
| 379 | } |
||
| 380 | } |
||
| 381 | |||
| 382 | /** |
||
| 383 | * @param string $region |
||
| 384 | * @param Twig_Environment $template |
||
| 385 | * @param bool $forced |
||
| 386 | * |
||
| 387 | * @return bool |
||
| 388 | * |
||
| 389 | * @todo improve this function |
||
| 390 | */ |
||
| 391 | public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false) |
||
| 437 | } |
||
| 438 | |||
| 439 | /** |
||
| 440 | * Loads plugin info. |
||
| 441 | * |
||
| 442 | * @staticvar array $plugin_data |
||
| 443 | * |
||
| 444 | * @param string $pluginName |
||
| 445 | * @param bool $forced load from DB or from the static array |
||
| 446 | * |
||
| 447 | * @return array |
||
| 448 | * |
||
| 449 | * @todo filter setting_form |
||
| 450 | */ |
||
| 451 | public function getPluginInfo($pluginName, $forced = false) |
||
| 452 | { |
||
| 453 | $plugin_info = []; |
||
| 454 | $pluginPath = api_get_path(SYS_PLUGIN_PATH); |
||
| 455 | |||
| 456 | $pluginDir = null; |
||
| 457 | foreach ([$pluginName, strtolower($pluginName), ucfirst(strtolower($pluginName))] as $dir) { |
||
| 458 | $path = $pluginPath . "$dir/plugin.php"; |
||
| 459 | if (is_file($path)) { |
||
| 460 | $fileToLoad = true; |
||
| 461 | include_once $path; |
||
| 462 | $pluginDir = $dir; |
||
| 463 | break; |
||
| 464 | } |
||
| 465 | } |
||
| 466 | |||
| 467 | if (isset($plugin_info['plugin_class']) && class_exists($plugin_info['plugin_class'], false)) { |
||
| 468 | $cls = $plugin_info['plugin_class']; |
||
| 469 | $instance = method_exists($cls, 'create') ? $cls::create() : new $cls(); |
||
| 470 | if (method_exists($instance, 'get_info')) { |
||
| 471 | $plugin_info = $instance->get_info(); |
||
| 472 | } |
||
| 473 | } |
||
| 474 | |||
| 475 | $repo = Container::getPluginRepository(); |
||
| 476 | $entity = $repo->findOneByTitle($pluginName) ?: $repo->findOneByTitle(ucfirst(strtolower($pluginName))); |
||
| 477 | if ($entity) { |
||
| 478 | $configByUrl = $entity->getConfigurationsByAccessUrl(Container::getAccessUrlUtil()->getCurrent()); |
||
| 479 | $plugin_info['settings'] = $configByUrl?->getConfiguration() ?? []; |
||
| 480 | } |
||
| 481 | |||
| 482 | return $plugin_info; |
||
| 483 | } |
||
| 484 | |||
| 485 | /** |
||
| 486 | * Get the template list. |
||
| 487 | * |
||
| 488 | * @param string $pluginName |
||
| 489 | * |
||
| 490 | * @return bool |
||
| 491 | */ |
||
| 492 | public function get_templates_list($pluginName) |
||
| 500 | } |
||
| 501 | |||
| 502 | /** |
||
| 503 | * @param int $courseId |
||
| 504 | */ |
||
| 505 | public function install_course_plugins(int $courseId): void |
||
| 506 | { |
||
| 507 | $pluginList = $this->getInstalledPluginListObject(); |
||
| 508 | if (empty($pluginList)) { |
||
| 509 | return; |
||
| 510 | } |
||
| 511 | |||
| 512 | $accessUrl = Container::getAccessUrlUtil()->getCurrent(); |
||
| 513 | $pluginRepo = Container::getPluginRepository(); |
||
| 514 | |||
| 515 | /** @var Plugin $obj */ |
||
| 516 | foreach ($pluginList as $obj) { |
||
| 517 | if (empty($obj->isCoursePlugin)) { |
||
| 518 | continue; |
||
| 519 | } |
||
| 520 | |||
| 521 | $entity = $pluginRepo->findOneByTitle($obj->get_name()); |
||
| 522 | $rel = $entity?->getConfigurationsByAccessUrl($accessUrl); |
||
| 523 | if (!$rel || !$rel->isActive()) { |
||
| 524 | continue; |
||
| 525 | } |
||
| 526 | |||
| 527 | $obj->get_settings(true); |
||
| 528 | |||
| 529 | $obj->course_install($courseId); |
||
| 530 | } |
||
| 531 | } |
||
| 532 | |||
| 533 | /** |
||
| 534 | * Trigger for Plugin::doWhenDeleting[Item] functions. |
||
| 535 | * |
||
| 536 | * @param string $itemType |
||
| 537 | * @param int $itemId |
||
| 538 | */ |
||
| 539 | public function performActionsWhenDeletingItem($itemType, $itemId) |
||
| 559 | } |
||
| 560 | } |
||
| 561 | } |
||
| 562 | |||
| 563 | /** |
||
| 564 | * Add the course settings to the course settings form. |
||
| 565 | * |
||
| 566 | * @param FormValidator $form |
||
| 567 | */ |
||
| 568 | public function add_course_settings_form($form) |
||
| 569 | { |
||
| 570 | $pluginList = $this->getInstalledPluginListObject(); |
||
| 571 | /** @var Plugin $obj */ |
||
| 572 | foreach ($pluginList as $obj) { |
||
| 573 | $pluginName = $obj->get_name(); |
||
| 574 | $pluginTitle = $obj->get_title(); |
||
| 575 | if (!empty($obj->course_settings)) { |
||
| 576 | $icon = Display::getMdiIcon( |
||
| 577 | ToolIcon::PLUGIN, |
||
| 578 | 'ch-tool-icon', |
||
| 579 | null, |
||
| 580 | ICON_SIZE_SMALL, |
||
| 581 | Security::remove_XSS($pluginTitle) |
||
| 582 | ); |
||
| 583 | $form->addHtml('<div class="panel panel-default">'); |
||
| 584 | $form->addHtml(' |
||
| 585 | <div class="panel-heading" role="tab" id="heading-'.$pluginName.'-settings"> |
||
| 586 | <h4 class="panel-title"> |
||
| 587 | <a class="collapsed" |
||
| 588 | role="button" data-toggle="collapse" data-parent="#accordion" |
||
| 589 | href="#collapse-'.$pluginName.'-settings" aria-expanded="false" |
||
| 590 | aria-controls="collapse-'.$pluginName.'-settings"> |
||
| 591 | '); |
||
| 592 | $form->addHtml($icon.' '.$pluginTitle); |
||
| 593 | $form->addHtml(' |
||
| 594 | </a> |
||
| 595 | </h4> |
||
| 596 | </div> |
||
| 597 | '); |
||
| 598 | $form->addHtml(' |
||
| 599 | <div |
||
| 600 | id="collapse-'.$pluginName.'-settings" |
||
| 601 | class="panel-collapse collapse" role="tabpanel" |
||
| 602 | aria-labelledby="heading-'.$pluginName.'-settings"> |
||
| 603 | <div class="panel-body"> |
||
| 604 | ' |
||
| 605 | ); |
||
| 606 | |||
| 607 | $groups = []; |
||
| 608 | foreach ($obj->course_settings as $setting) { |
||
| 609 | if (false === $obj->validateCourseSetting($setting['name'])) { |
||
| 610 | continue; |
||
| 611 | } |
||
| 612 | if ('checkbox' !== $setting['type']) { |
||
| 613 | $form->addElement($setting['type'], $setting['name'], $obj->get_lang($setting['name'])); |
||
| 614 | } else { |
||
| 615 | $element = &$form->createElement( |
||
| 616 | $setting['type'], |
||
| 617 | $setting['name'], |
||
| 618 | '', |
||
| 619 | $obj->get_lang($setting['name']) |
||
| 620 | ); |
||
| 621 | $courseSetting = api_get_course_setting($setting['name']); |
||
| 622 | if (-1 === $courseSetting) { |
||
| 623 | $defaultValue = api_get_plugin_setting($pluginName, $setting['name']); |
||
| 624 | if (!empty($defaultValue)) { |
||
| 625 | if ('true' === $defaultValue) { |
||
| 626 | $element->setChecked(true); |
||
| 627 | } |
||
| 628 | } |
||
| 629 | } |
||
| 630 | |||
| 631 | if (isset($setting['init_value']) && 1 == $setting['init_value']) { |
||
| 632 | $element->setChecked(true); |
||
| 633 | } |
||
| 634 | $form->addElement($element); |
||
| 635 | |||
| 636 | if (isset($setting['group'])) { |
||
| 637 | $groups[$setting['group']][] = $element; |
||
| 638 | } |
||
| 639 | } |
||
| 640 | } |
||
| 641 | foreach ($groups as $k => $v) { |
||
| 642 | $form->addGroup($groups[$k], $k, [$obj->get_lang($k)]); |
||
| 643 | } |
||
| 644 | $form->addButtonSave(get_lang('Save settings')); |
||
| 645 | $form->addHtml( |
||
| 646 | ' |
||
| 647 | </div> |
||
| 648 | </div> |
||
| 649 | ' |
||
| 650 | ); |
||
| 651 | $form->addHtml('</div>'); |
||
| 652 | } |
||
| 653 | } |
||
| 654 | } |
||
| 655 | |||
| 656 | /** |
||
| 657 | * Get all course settings from all installed plugins. |
||
| 658 | * |
||
| 659 | * @return array |
||
| 660 | */ |
||
| 661 | public function getAllPluginCourseSettings() |
||
| 662 | { |
||
| 663 | $pluginList = $this->getInstalledPluginListObject(); |
||
| 664 | /** @var Plugin $obj */ |
||
| 665 | $courseSettings = []; |
||
| 666 | if (!empty($pluginList)) { |
||
| 667 | foreach ($pluginList as $obj) { |
||
| 668 | $pluginCourseSetting = $obj->getCourseSettings(); |
||
| 669 | $courseSettings = array_merge($courseSettings, $pluginCourseSetting); |
||
| 670 | } |
||
| 671 | } |
||
| 672 | |||
| 673 | return $courseSettings; |
||
| 674 | } |
||
| 675 | |||
| 676 | /** |
||
| 677 | * When saving the plugin values in the course settings, check whether |
||
| 678 | * a callback method should be called and send it the updated settings. |
||
| 679 | * |
||
| 680 | * @param array $values The new settings the user just saved |
||
| 681 | */ |
||
| 682 | public function saveCourseSettingsHook($values) |
||
| 683 | { |
||
| 684 | $pluginList = $this->getInstalledPluginListObject(); |
||
| 685 | |||
| 686 | /** @var Plugin $obj */ |
||
| 687 | foreach ($pluginList as $obj) { |
||
| 688 | $settings = $obj->getCourseSettings(); |
||
| 689 | $subValues = []; |
||
| 690 | if (!empty($settings)) { |
||
| 691 | foreach ($settings as $v) { |
||
| 692 | if (isset($values[$v])) { |
||
| 693 | $subValues[$v] = $values[$v]; |
||
| 694 | } |
||
| 695 | } |
||
| 696 | } |
||
| 697 | |||
| 698 | if (!empty($subValues)) { |
||
| 699 | $obj->course_settings_updated($subValues); |
||
| 700 | } |
||
| 701 | } |
||
| 702 | } |
||
| 703 | |||
| 704 | /** |
||
| 705 | * @param array $pluginRegionList |
||
| 706 | * @param string $pluginRegion |
||
| 707 | * @param Twig_Environment $twig |
||
| 708 | */ |
||
| 709 | public function setPluginRegion($pluginRegionList, $pluginRegion, $twig) |
||
| 716 | ); |
||
| 717 | |||
| 718 | //$twig->addGlobal('plugin_'.$pluginRegion, $regionContent); |
||
| 719 | } |
||
| 720 | } |
||
| 721 |