mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 05:36:54 +02:00
feat(entries): setOptions
and setRegistry
should return self
This commit is contained in:
@@ -185,6 +185,7 @@ class Entries
|
||||
if (isset($collection['pattern'])) {
|
||||
if (boolval(preg_match_all('#^' . $collection['pattern'] . '$#', $id, $matches, PREG_OFFSET_CAPTURE))) {
|
||||
$result = $collection;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -842,9 +843,11 @@ class Entries
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function setRegistry(array $registry = []): void
|
||||
public function setRegistry(array $registry = []): self
|
||||
{
|
||||
$this->registry = collection($registry);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -854,9 +857,11 @@ class Entries
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function setOptions(array $options = []): void
|
||||
public function setOptions(array $options = []): self
|
||||
{
|
||||
$this->options = $options;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -897,6 +902,8 @@ class Entries
|
||||
->trim()->toString();
|
||||
};
|
||||
|
||||
$processedEntry= [];
|
||||
|
||||
foreach($flatEntry as $key => $value) {
|
||||
|
||||
// Process shortcodes for value if it's string type.
|
||||
|
Reference in New Issue
Block a user