Files
zurawik.pl/core/model/SimpleArticle/MfArticleDescription.class.php
2026-05-15 18:33:51 +02:00

194 lines
3.5 KiB
PHP

<?php
/**
* Klasa jezykowa prostych artykulow
*
*/
class SimpleArticle_MfArticleDescription extends DataObject {
/**
* nazwa tabeli
*/
static $tableName = 'mf_article_description';
/**
* nazwa klucza tabeli
*/
static $classTablePK = 'id_mf_article_description';
/**
* nazwa klasy
*/
static $className = __CLASS__;
/**
* tabela mapująca pola z bazy SQL na pola klasy.
*/
static $fields = array(
'id_mf_article_description' => 'id',
'id_mf_article' => 'idMfArticle' ,
'title' => 'title' ,
'browser_title' => 'browserTitle',
'description' => 'description' ,
'description_add' => 'descriptionAdd' ,
'shortnote' => 'shortnote',
'lang' => 'lang',
'publication' => 'publication',
'autor' => 'autor'
);
protected $id;
private $idMfArticle;
private $title;
private $browserTitle;
private $description;
private $descriptionAdd;
private $shortnote;
private $lang;
private $publication;
private $autor;
public function GetId() {
return $this->id;
}
public function SetId($id) {
$this->id = $id;
}
public function GetIdMfArticle() {
return $this->idMfArticle;
}
public function SetIdMfArticle($idMfArticle) {
$this->idMfArticle = $idMfArticle;
}
public function GetTitle() {
return $this->title;
}
public function GetTitleInput() {
return Utils::SaveInput($this->title);
}
public function SetTitle($title) {
$this->title = $title;
}
public function GetBrowserTitle() {
return $this->browserTitle;
}
public function SetBrowserTitle($browserTitle) {
if ($browserTitle) {
$this->browserTitle = $browserTitle;
} else {
$this->browserTitle = $this->title;
}
}
public function GetDescription() {
return str_replace('"2cms', '"'.URL_STATIC_CONTENT.'/upload/edytor/2cms', $this->description);
}
public function SetDescription($description) {
$this->description = $description;
}
public function SetDescriptionAdd($descriptionAdd) {
$this->descriptionAdd = $descriptionAdd;
}
public function GetDescriptionAdd() {
return $this->descriptionAdd;
}
public function GetShortnote() {
return $this->shortnote;
}
public function SetShortnote($shortnote) {
$this->shortnote = $shortnote;
}
public function GetLang() {
return $this->lang;
}
public function SetLang($lang) {
$this->lang = $lang;
}
public function GetAutor() {
return $this->autor;
}
public function SetAutor($s) {
$this->autor = $s;
}
public function GetPublication() {
return $this->publication;
}
public function SetPublication($publication) {
$this->publication = $publication;
}
public function GetDescriptionArray() {
$array = explode('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>', stripslashes($this->description));
//Utils::ArrayDisplay($array);
$this->SetDescriptionArray($array);
return $array;
}
public function SetDescriptionArray($descriptionArray) {
$this->descriptionArray = $descriptionArray;
}
/**
* Konstruktor klasy
*
* @param integer $id
*/
public function __construct($id = -1) {
$this->SetId($id);
}
/**
* Pobiera nazwę tabeli reprezentującej obiekt w SQL
* @return string
*/
public function GetTableName(){
return self::$tableName;
}
/**
* Pobiera taablice mapującą pola klasy na pola tabeli
* @return array
*/
public function GetFields(){
return self::$fields;
}
/**
* Pobiera nazwę klasy
* @return string
*/
public function GetClassName(){
return self::$className;
}
public function GetClassTablePK() {
return self::$classTablePK;
}
}
?>