TrackManiaControl/application/core/FML/Controls/FileEntry.php

49 lines
844 B
PHP
Raw Normal View History

<?php
namespace FML\Controls;
/**
* Class representing CMlFileEntry
*
* @author steeffeen
*/
class FileEntry extends Entry {
/**
2013-12-31 02:55:19 +01:00
* Protected Properties
*/
protected $folder = '';
/**
2013-12-31 02:55:19 +01:00
* Construct a new FileEntry Control
*
2014-01-12 00:51:46 +01:00
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);
$this->tagName = 'fileentry';
}
/**
2013-12-31 02:55:19 +01:00
* Set Folder
*
2014-01-12 00:51:46 +01:00
* @param string $folder Base Folder
* @return \FML\Controls\FileEntry
*/
public function setFolder($folder) {
2014-01-12 00:51:46 +01:00
$this->folder = (string) $folder;
return $this;
}
/**
*
* @see \FML\Entry::render()
*/
public function render(\DOMDocument $domDocument) {
2014-01-12 00:51:46 +01:00
$xmlElement = parent::render($domDocument);
if ($this->folder) {
$xmlElement->setAttribute('folder', $this->folder);
}
return $xmlElement;
}
}