phplibrary/core/widgets/filebrowser.php
2016-07-14 16:29:26 +03:00

39 lines
No EOL
751 B
PHP

<?php
require_once 'core/widgets/listtable.php';
/**
* Класс для генерации таблицы
*/
class FileBrowser extends ListTable
{
private $friend;
public function setType($type)
{
$this->setData('type', $type);
}
function setHeader($header)
{
$this->setData('table', $header);
}
function setFriend(Widget $friend)
{
$this->friend = $friend->getName();
}
function getPostCode()
{
if ($this->friend) {
return $this->getName() . ".setFriend(" . $this->friend . ");";
}
return "";
}
function postMake() {
$this->view->addScriptRaw($this->getPostCode(), true); // CompositeView
}
}
?>