Your IP : 216.73.216.220


Current Path : /var/www/surf/TYPO3/vendor/typo3/cms-backend/Classes/Template/Components/
Upload File :
Current File : /var/www/surf/TYPO3/vendor/typo3/cms-backend/Classes/Template/Components/AbstractControl.php

<?php

/*
 * This file is part of the TYPO3 CMS project.
 *
 * It is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, either version 2
 * of the License, or any later version.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 * The TYPO3 project - inspiring people to share!
 */

namespace TYPO3\CMS\Backend\Template\Components;

/**
 * Control used by various components
 */
class AbstractControl
{
    /**
     * HTML tag attribute for class
     *
     * @var string
     */
    protected $classes = '';

    /**
     * HTML tag attribute for title
     *
     * @var string
     */
    protected $title = '';

    /**
     * HTML tag attributes for data-*
     * Use key => value pairs
     *
     * @var array
     */
    protected $dataAttributes = [];

    /**
     * Get classes
     *
     * @return string
     */
    public function getClasses()
    {
        return $this->classes;
    }

    /**
     * Get Title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Get Data attributes
     *
     * @return array
     */
    public function getDataAttributes()
    {
        return $this->dataAttributes;
    }

    /**
     * Set classes
     *
     * @param string $classes HTML class attribute to set
     *
     * @return $this
     */
    public function setClasses($classes)
    {
        $this->classes = $classes;
        return $this;
    }

    /**
     * Set title attribute
     *
     * @param string $title HTML title attribute to set
     *
     * @return $this
     */
    public function setTitle($title)
    {
        $this->title = $title;
        return $this;
    }

    /**
     * Set Data attributes
     *
     * @param array $dataAttributes HTML data attributes to set
     *
     * @return $this
     */
    public function setDataAttributes(array $dataAttributes)
    {
        $this->dataAttributes = $dataAttributes;
        return $this;
    }
}