31 lines
922 B
PHP
31 lines
922 B
PHP
<?php
|
|
class default_element extends \SYSTEM\PAGE\Page {
|
|
|
|
var $text_id = null;
|
|
public function __construct($text_id) {
|
|
|
|
$this->text_id = $text_id;
|
|
}
|
|
|
|
|
|
public function get_text(){
|
|
$result = '';
|
|
$element = elements::getText($this->text_id);
|
|
$element['title'] = $element['id'];
|
|
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_element/element.tpl'), $element);
|
|
return $result;
|
|
}
|
|
|
|
public function html(){
|
|
$vars = array();
|
|
$vars['text'] = $this->get_text();
|
|
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_element/default_element.tpl'), $vars);
|
|
}
|
|
}
|
|
/*
|
|
* To change this license header, choose License Headers in Project Properties.
|
|
* To change this template file, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
|