| Total Complexity | 6 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | abstract class AbstractCacheFunctionalityModuleResolver extends AbstractFunctionalityModuleResolver |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Enable to customize a specific UI for the module |
||
| 21 | */ |
||
| 22 | public function getModuleType(string $module): string |
||
| 23 | { |
||
| 24 | return ModuleTypeResolver::PERFORMANCE; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Allow to change the behavior based on the environment |
||
| 29 | * |
||
| 30 | * @return boolean |
||
| 31 | */ |
||
| 32 | protected function enabledEnvironmentBasedBehavior(): bool |
||
| 35 | } |
||
| 36 | |||
| 37 | public function isHidden(string $module): bool |
||
| 38 | { |
||
| 39 | if ($this->enabledEnvironmentBasedBehavior()) { |
||
| 40 | $environment = PluginEnvironment::getPluginEnvironment(); |
||
| 41 | return $environment == PluginEnvironment::PLUGIN_ENVIRONMENT_PROD; |
||
| 42 | } |
||
| 43 | return parent::isHidden($module); |
||
| 44 | } |
||
| 45 | |||
| 46 | public function isEnabledByDefault(string $module): bool |
||
| 53 | } |
||
| 54 | } |
||
| 55 |