moved Libs out of core folder
This commit is contained in:
48
application/libs/FML/Controls/FileEntry.php
Normal file
48
application/libs/FML/Controls/FileEntry.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace FML\Controls;
|
||||
|
||||
/**
|
||||
* FileEntry Control
|
||||
* (CMlFileEntry)
|
||||
*
|
||||
* @author steeffeen <mail@steeffeen.com>
|
||||
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class FileEntry extends Entry {
|
||||
/*
|
||||
* Protected properties
|
||||
*/
|
||||
protected $tagName = 'fileentry';
|
||||
protected $folder = null;
|
||||
|
||||
/**
|
||||
* @see \FML\Controls\Control::getManiaScriptClass()
|
||||
*/
|
||||
public function getManiaScriptClass() {
|
||||
return 'CMlFileEntry';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the base folder
|
||||
*
|
||||
* @param string $folder Base folder
|
||||
* @return static
|
||||
*/
|
||||
public function setFolder($folder) {
|
||||
$this->folder = (string)$folder;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see \FML\Types\Renderable::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