mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 03:21:33 +01:00
Minor Flex improvements
This commit is contained in:
@@ -49,6 +49,7 @@ class FlexCollection extends ObjectCollection implements FlexCollectionInterface
|
||||
'getNestedProperty' => true,
|
||||
'orderBy' => true,
|
||||
|
||||
'render' => false,
|
||||
'authorize' => true
|
||||
];
|
||||
}
|
||||
|
||||
@@ -298,7 +298,9 @@ class FlexIndex extends ObjectIndex implements FlexCollectionInterface, FlexInde
|
||||
$collection = $this->loadCollection();
|
||||
$result = $collection->{$name}(...$arguments);
|
||||
$class = \get_class($collection);
|
||||
$debugger->addMessage("Call '{$class}:{$name}()' isn't cached", 'debug');
|
||||
if (!isset($cachedMethods[$name])) {
|
||||
$debugger->addMessage("Call '{$class}:{$name}()' isn't cached", 'debug');
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -357,15 +357,16 @@ class FlexObject implements FlexObjectInterface, FlexAuthorizeInterface
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $default
|
||||
* @param string $separator
|
||||
* @return mixed
|
||||
*/
|
||||
public function value($name, $default = null)
|
||||
public function value($name, $default = null, $separator = null)
|
||||
{
|
||||
if ($name === 'storage_key') {
|
||||
return $this->getStorageKey();
|
||||
}
|
||||
|
||||
return $this->getNestedProperty($name, $default);
|
||||
return $this->getNestedProperty($name, $default, $separator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user