fix #72 - update to Kirby 4.5
This commit is contained in:
parent
cb1f842fc9
commit
44d08b3e21
273 changed files with 678 additions and 54176 deletions
|
|
@ -30,7 +30,9 @@ class OptionsQuery extends OptionsProvider
|
|||
public function __construct(
|
||||
public string $query,
|
||||
public string|null $text = null,
|
||||
public string|null $value = null
|
||||
public string|null $value = null,
|
||||
public string|null $icon = null,
|
||||
public string|null $info = null
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -56,8 +58,10 @@ class OptionsQuery extends OptionsProvider
|
|||
|
||||
return new static(
|
||||
query: $props['query'] ?? $props['fetch'],
|
||||
text: $props['text'] ?? null,
|
||||
value: $props['value'] ?? null
|
||||
text : $props['text'] ?? null,
|
||||
value: $props['value'] ?? null,
|
||||
icon : $props['icon'] ?? null,
|
||||
info : $props['info'] ?? null
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -178,7 +182,11 @@ class OptionsQuery extends OptionsProvider
|
|||
$safeMethod = $safeMode === true ? 'toSafeString' : 'toString';
|
||||
$text = $model->$safeMethod($this->text ?? $text, $data);
|
||||
|
||||
return compact('text', 'value');
|
||||
// additional data
|
||||
$icon = $this->icon !== null ? $model->toString($this->icon, $data) : null;
|
||||
$info = $this->info !== null ? $model->$safeMethod($this->info, $data) : null;
|
||||
|
||||
return compact('text', 'value', 'icon', 'info');
|
||||
});
|
||||
|
||||
return $this->options = Options::factory($options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue