mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-06 18:31:05 +00:00
31 lines
573 B
PHP
31 lines
573 B
PHP
![]() |
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace App\View\Components\Forms;
|
||
|
|
||
|
use ViewComponents\Component;
|
||
|
|
||
|
class XMLEditor extends Component
|
||
|
{
|
||
|
protected string $content = '';
|
||
|
|
||
|
/**
|
||
|
* @var array<string, string>
|
||
|
*/
|
||
|
protected array $attributes = [
|
||
|
'slot' => 'textarea',
|
||
|
'rows' => '5',
|
||
|
'class' => 'textarea',
|
||
|
];
|
||
|
|
||
|
public function render(): string
|
||
|
{
|
||
|
$textarea = form_textarea($this->attributes, $this->content);
|
||
|
|
||
|
return <<<CODE_SAMPLE
|
||
|
<xml-editor>{$textarea}</time-ago>
|
||
|
CODE_SAMPLE;
|
||
|
}
|
||
|
}
|