protected function filterVisiblePlugins() { return array_filter($this->enabledPlugins, function (Plugin $plugin) { return $plugin->getConfigurationValue('visible') && $plugin->hasFields(); }); }