HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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;
    }
}