HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/backip-old-files/libraries/smartslider3/src/Framework/Form/Element/Textarea.php
<?php


namespace Nextend\Framework\Form\Element;


use Nextend\Framework\Asset\Js\Js;
use Nextend\Framework\Form\AbstractField;
use Nextend\Framework\Sanitize;
use Nextend\Framework\View\Html;

class Textarea extends AbstractField {

    protected $width = 200;

    protected $height = 44;

    protected $minHeight = 44;

    protected $resize = 'vertical';

    protected $classes = array(
        'n2_field_textarea'
    );

    protected function fetchElement() {

        Js::addInline('new N2Classes.FormElementText("' . $this->fieldID . '");');

        return Html::tag('div', array(
            'class' => implode(' ', $this->classes),
            'style' => $this->style
        ), Html::tag('textarea', array(
            'id'           => $this->fieldID,
            'name'         => $this->getFieldName(),
            'autocomplete' => 'off',
            'style'        => 'width:' . $this->width . 'px;height:' . $this->height . 'px;min-height:' . $this->minHeight . 'px;resize:' . $this->resize . ';'
        ), Sanitize::esc_textarea($this->getValue())));
    }

    /**
     * @param int $width
     */
    public function setWidth($width) {
        $this->width = $width;
    }

    /**
     * @param int $height
     */
    public function setHeight($height) {
        $this->height = $height;
        if ($this->minHeight > $height) {
            $this->minHeight = $height;
        }
    }

    /**
     * @param int $minHeight
     */
    public function setMinHeight($minHeight) {
        $this->minHeight = $minHeight;
    }

    /**
     * @param string $resize
     */
    public function setResize($resize) {
        $this->resize = $resize;
    }

    public function setFieldStyle($style) {

    }
}