mirror of
https://github.com/getgrav/grav.git
synced 2026-03-01 10:01:26 +01:00
Fixed broken Plugin::config() method
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}"] : [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user