- First task of v2 done

This commit is contained in:
mcndave committed 2023-02-02 16:43:15 +00:00
1 parent 30ddd4c98b
commit 5397ed4fae
50 files changed
+237 -105

No files matched your search

+2 -6
View File
@@ -4,7 +4,7 @@ namespace Picea\Ui\Form;
class UiTextarea extends UiInput {
public array $tokens = [ "ui.textarea", "ui.textarea.raw" ];
public array $tokens = [ "ui:textarea" ];
public string $tag = "textarea";
@@ -18,11 +18,7 @@ class UiTextarea extends UiInput {
public function parse(\Picea\Compiler\Context &$context, ?string $arguments, string $token) : string
{
if ($token === 'ui.textarea.raw') {
$this->echoRaw = true;
}
$raw = $this->echoRaw ? 'true' : 'false';
$raw = in_array('raw', $context->tokenOptions($token, true)) ? 'true' : 'false';
return "<?php echo ( new \\" . static::class . "() )->echoRaw($raw)->buildHtml($arguments) ?>";
}