File: D:/HostingSpaces/brameda/brameda.nl/app/Komma/Kms/Core/Attributes/TextArea.php
<?php
namespace App\Komma\Kms\Core\Attributes;
use App\Komma\Kms\Core\Attributes\Traits\LabelTrait;
use App\Komma\Kms\Core\Attributes\Traits\PlaceholderTextTrait;
class TextArea extends Attribute
{
use LabelTrait;
use PlaceholderTextTrait;
private $defaultHeight = 100;
private $tinymceEditor = false;
/**
* TextArea constructor.
* @param string $text The text of the TextArea
*/
public function __construct(string $text = '')
{
parent::__construct();
$this->setValue($text);
}
/**
* Returns a view that visually represents this attribute
*
* @return \Illuminate\View\View
*/
public function render()
{
return view('kms/attributes.textArea', [
'attribute' => $this
]);
}
/**
* @return int
*/
public function getDefaultHeight(): int
{
return $this->defaultHeight;
}
/**
* @param int $defaultHeight
* @return TextArea
*/
public function setDefaultHeight(int $defaultHeight): TextArea
{
$this->defaultHeight = $defaultHeight;
return $this;
}
/**
* @return bool
*/
public function hasTinymceEditor(): bool
{
return $this->tinymceEditor;
}
/**
* @return TextArea
*/
public function enableTinymceEditor(): TextArea
{
$this->tinymceEditor = true;
return $this;
}
}