TrackManiaControl/libs/FML/Controls/FileEntry.php

74 lines
1.3 KiB
PHP
Raw Normal View History

<?php
namespace FML\Controls;
/**
2014-01-19 19:30:21 +01:00
* FileEntry Control
* (CMlFileEntry)
*
2014-05-20 15:44:45 +02:00
* @author steeffeen <mail@steeffeen.com>
2017-03-25 18:40:15 +01:00
* @copyright FancyManiaLinks Copyright © 2017 Steffen Schröder
2014-05-16 22:44:22 +02:00
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
2017-03-25 18:40:15 +01:00
class FileEntry extends Entry
{
/**
* @var string $folder Folder
*/
protected $folder = null;
/**
* Get the folder
*
* @api
* @return string
*/
public function getFolder()
{
return $this->folder;
}
/**
* Set the folder
*
* @api
* @param string $folder Base folder
* @return static
*/
public function setFolder($folder)
{
$this->folder = (string)$folder;
return $this;
}
/**
* @see Control::getTagName()
*/
public function getTagName()
{
return "fileentry";
}
/**
* @see Control::getManiaScriptClass()
*/
public function getManiaScriptClass()
{
return "CMlFileEntry";
}
/**
* @see Renderable::render()
*/
public function render(\DOMDocument $domDocument)
{
$domElement = parent::render($domDocument);
if ($this->folder) {
$domElement->setAttribute("folder", $this->folder);
}
return $domElement;
}
}