Huge FML Update

This commit is contained in:
Steffen Schröder
2014-01-12 00:51:46 +01:00
parent 6a6fa56596
commit 345368df39
69 changed files with 2068 additions and 429 deletions

View File

@ -16,8 +16,7 @@ class FileEntry extends Entry {
/**
* Construct a new FileEntry Control
*
* @param string $id
* Control Id
* @param string $id (optional) Control Id
*/
public function __construct($id = null) {
parent::__construct($id);
@ -27,12 +26,11 @@ class FileEntry extends Entry {
/**
* Set Folder
*
* @param string $folder
* Base Folder
* @param string $folder Base Folder
* @return \FML\Controls\FileEntry
*/
public function setFolder($folder) {
$this->folder = $folder;
$this->folder = (string) $folder;
return $this;
}
@ -41,8 +39,10 @@ class FileEntry extends Entry {
* @see \FML\Entry::render()
*/
public function render(\DOMDocument $domDocument) {
$xml = parent::render($domDocument);
$xml->setAttribute('folder', $this->folder);
return $xml;
$xmlElement = parent::render($domDocument);
if ($this->folder) {
$xmlElement->setAttribute('folder', $this->folder);
}
return $xmlElement;
}
}