folderstructure change
This commit is contained in:
committed by
Steffen Schröder
parent
043c85fa97
commit
570b32fff8
60
application/core/Libs/FML/Controls/FileEntry.php
Normal file
60
application/core/Libs/FML/Controls/FileEntry.php
Normal file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Controls;
|
||||
|
||||
/**
|
||||
* FileEntry Control
|
||||
* (CMlFileEntry)
|
||||
*
|
||||
* @author steeffeen
|
||||
*/
|
||||
class FileEntry extends Entry {
|
||||
/*
|
||||
* Protected Properties
|
||||
*/
|
||||
protected $folder = '';
|
||||
|
||||
/**
|
||||
* Create a new FileEntry Control
|
||||
*
|
||||
* @param string $id (optional) Control Id
|
||||
* @return \FML\Controls\FileEntry
|
||||
*/
|
||||
public static function create($id = null) {
|
||||
$fileEntry = new FileEntry($id);
|
||||
return $fileEntry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new FileEntry Control
|
||||
*
|
||||
* @param string $id (optional) Control Id
|
||||
*/
|
||||
public function __construct($id = null) {
|
||||
parent::__construct($id);
|
||||
$this->tagName = 'fileentry';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Folder
|
||||
*
|
||||
* @param string $folder Base Folder
|
||||
* @return \FML\Controls\FileEntry
|
||||
*/
|
||||
public function setFolder($folder) {
|
||||
$this->folder = (string) $folder;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see \FML\Entry::render()
|
||||
*/
|
||||
public function render(\DOMDocument $domDocument) {
|
||||
$xmlElement = parent::render($domDocument);
|
||||
if ($this->folder) {
|
||||
$xmlElement->setAttribute('folder', $this->folder);
|
||||
}
|
||||
return $xmlElement;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user