Fixed broken Plugin::config() method

This commit is contained in:
Matias Griese
2020-04-27 19:21:02 +03:00
parent 44b07712d5
commit bfb55f0e1d
3 changed files with 8 additions and 4 deletions

View File

@@ -18,6 +18,7 @@
* Fixed `Flex Pages` not updating empty content on save [#2890](https://github.com/getgrav/grav/issues/2890)
* Fixed creating new Flex User with file storage
* Fixed saving new `Flex Object` with custom key
* Fixed broken `Plugin::config()` method
# v1.7.0-rc.8
## 03/19/2020

View File

@@ -91,10 +91,7 @@ class Plugin implements EventSubscriberInterface, \ArrayAccess
*/
public function config()
{
if (is_array($this->config)) {
return $this->config["plugins.{$this->name}"];
}
return null !== $this->config ? $this->config["plugins.{$this->name}"] : [];
}
/**

View File

@@ -70,11 +70,17 @@ class FlexIndex extends ObjectIndex implements FlexCollectionInterface, FlexInde
}
/**
* You can define indexes for fast lookup.
*
* Primary key: $meta['key']
* Secondary keys: $meta['my_field']
*
* @param array $meta
* @param array $data
*/
public static function updateObjectMeta(array &$meta, array $data)
{
// For backwards compatibility, no need to call this method when you override this method.
static::updateIndexData($meta, $data);
}