Jake Vanderwerf
2026-08-30 f8ffc3dc1748b9af63123eb281696c0c30448715
inc/meta/Group.php
@@ -16,7 +16,7 @@
   {
      $this->meta = $meta;
      $this->name = $name;
      $this->config = $meta->config($name) ?? [];
      $this->config = $meta->getFieldConfig($name) ?? [];
      $data = $meta->get($name);
      $this->data = is_array($data) ? $data : [];
@@ -44,12 +44,11 @@
      return $this->getPath($nested, $fieldConfig['fields'] ?? [], $parts);
   }
   public function set(string $path, mixed $value, bool $autosave = true): self
   public function set(string $path, mixed $value, bool $autosave = true): bool
   {
      $parts = explode('|', $path);
      $parts = explode('|', $path, 2);
      $this->setPath($this->data, $this->config['fields'] ?? [], $parts, $value);
      $this->sync($autosave);
      return $this;
      return $this->sync($autosave);
   }
   protected function setPath(array &$data, array $fieldsConfig, array $parts, mixed $value): void
@@ -97,8 +96,8 @@
      return isset($this->config['fields'][$field]);
   }
   protected function sync(bool $autosave = true): void
   protected function sync(bool $autosave = true): bool
   {
      $this->meta->set($this->name, $this->data, $autosave);
      return $this->meta->set($this->name, $this->data);
   }
}