Movee Formatters to Type factory
Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
parent
057a2d625e
commit
4abd95f303
12 changed files with 40 additions and 68 deletions
|
|
@ -9,9 +9,10 @@ use DateTime;
|
|||
|
||||
class Type
|
||||
{
|
||||
public function __construct($value)
|
||||
public function __construct($value, $settings = [])
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
|
|
@ -27,7 +28,7 @@ class Type
|
|||
case 'boolean':
|
||||
return new BooleanType($this->value);
|
||||
case 'array':
|
||||
return new ArrayType($this->value);
|
||||
return new ArrayType($this->value, $this->settings);
|
||||
default:
|
||||
return (string)$this->value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue