/** * Retrieve all plugins * * Merges the list of plugins with the plugin metadata * * @return array */ protected function getPlugins() { if (is_array($this->plugins)) { return $this->plugins; } $plugins = parent::getPlugins(); $plugins = array_flip($plugins); $plugins = array_merge($plugins, $this->metadata->fetchAll()); array_walk($plugins, function (&$value) { if (is_array($value)) { return; } $value = ['breakchainonfailure' => 'bool']; }); $this->plugins = $plugins; return $this->plugins; }
/** * Retrieve all plugins * * Merges the list of plugins with the plugin metadata * * @return array */ protected function getPlugins() { if (is_array($this->plugins)) { return $this->plugins; } $plugins = parent::getPlugins(); $plugins = array_flip($plugins); $metadata = $this->metadata; array_walk($plugins, function (&$value, $key) use($metadata) { if (!array_key_exists($key, $metadata)) { $value = []; return; } $value = $metadata[$key]; }); $this->plugins = $plugins; return $this->plugins; }