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

312 lines
5.8 KiB
PHP

<?php
/**
* Description of ParagraphImage
*
* @author Kopi
*/
class Image extends DataObject {
static $tableName = 'mf_image';
static $className = __CLASS__;
static $fields = array(
'id_mf_image' => 'id',
'id_image_group' => 'idImageGroup',
'id_wp_source' => 'idSource',
'alt' => 'alt',
'title' => 'title',
'path' => 'path',
'src' => 'src',
'position' => 'position',
'size' => 'size',
'author' => 'author',
'description' => 'description',
'weight' => 'weight'
);
private $idImageGroup;
private $alt;
private $title;
private $path;
private $src;
private $position;
private $size;
private $author;
private $description;
private $idSource;
private $points;
private $weight;
private $linkType;
public $source;
public $articleArray = array();
public $galleryArray = array();
public $countryArray = array();
public function GetTableName() {
return self::$tableName;
}
/**
*
* @return array
*/
public function GetFields() {
return self::$fields;
}
/**
*
* @return string
*/
public function GetClassName() {
return self::$className;
}
public function GetClassTablePK() {
return self::$classTablePK;
}
public function GetId() {
return $this->id;
}
public function SetId($id) {
$this->id = $id;
}
public function getLinkType() {
return $this->linkType;
}
public function setLinkType($linkType) {
$this->linkType = $linkType;
}
public function GetIdparagraph() {
return $this->idParagraph;
}
public function SetIdparagraph($idParagraph) {
$this->idParagraph = $idParagraph;
}
public function GetAlt() {
return $this->alt;
}
public function SetAlt($alt) {
$this->alt = $alt;
}
public function getTitle($convert = null) {
if (isset($convert) && $convert != '') {
return iconv('iso-8859-2', $convert, $this->title);
} else {
return $this->title;
}
}
public function SetTitle($title) {
$this->title = $title;
}
public function GetPath() {
return $this->path;
}
public function GetFullPath() {
return PATH_STATIC . "/upload/Article/gallery/" . $this->path;
}
public function GetFullPathMini() {
return PATH_STATIC . "/upload/Article/th_" . $this->path;
}
public function GetFullUrl() {
return URL_STATIC_CONTENT . "/upload/Article/" . $this->path;
}
public function GetFullUrlMini() {
return URL_STATIC_CONTENT . "/upload/Article/th_" . $this->path;
}
public function GetFullUrlId($id, $folder = 'Article') {
return URL_STATIC_CONTENT . "/upload/$folder/" . $id . "/" . $this->path;
}
public function GetFullUrlMaxId($id, $folder = 'Article') {
return URL_STATIC_CONTENT . "/upload/$folder/" . $id . "/full_" . $this->path;
}
public function GetFullUrlMiniId($id, $folder = 'Article') {
return URL_STATIC_CONTENT . "/upload/$folder/" . $id . "/" . "th_" . $this->path;
}
public function GetFullUrlOrgId($id, $folder = 'Article') {
return URL_STATIC_CONTENT . "/upload/$folder/" . $id . "/" . "org_" . $this->path;
}
public function GetFullPathId($id, $folder = 'Article') {
return PATH_STATIC_CONTENT . "upload/$folder/" . $id . "/" . $this->path;
}
public function GetFullPathMaxId($id, $folder = 'Article') {
return PATH_STATIC_CONTENT . "upload/$folder/" . $id . "/full_" . $this->path;
}
public function GetFullPathOrgId($id, $folder = 'Article') {
return PATH_STATIC_CONTENT . "upload/$folder/" . $id . "/org_" . $this->path;
}
public function SetPath($path) {
$this->path = $path;
}
public function GetSrc($convert = null) {
if (isset($convert) && $convert != '') {
return iconv('iso-8859-2', $convert, $this->src);
} else {
return $this->src;
}
}
public function SetSrc($src) {
$this->src = $src;
}
public function GetPosition() {
return $this->position;
}
public function SetPosition($position) {
$this->position = $position;
}
public function getIdArticle() {
return $this->idArticle;
}
public function setIdArticle($idArticle) {
$this->idArticle = $idArticle;
}
public function getSize() {
return $this->size;
}
public function setSize($size) {
$this->size = $size;
}
public function getIdImageGroup() {
return $this->idImageGroup;
}
public function setIdImageGroup($idImageGroup) {
$this->idImageGroup = $idImageGroup;
}
public function getArticleArray() {
return $this->articleArray;
}
public function setArticleArray($articleArray) {
$this->articleArray = $articleArray;
}
public function setArticle($article) {
$this->articleArray[] = $article;
}
public function getGalleryArray() {
return $this->galleryArray;
}
public function setGalleryArray($galleryArray) {
$this->galleryArray = $galleryArray;
}
public function setGallery($gallery) {
$this->galleryArray[] = $gallery;
}
public function getCountryArray() {
return $this->countryArray;
}
public function setCountryArray($countryArray) {
$this->countryArray = $countryArray;
}
public function setCountry($country) {
$this->countryArray[] = $country;
}
public function getAuthor($convert = null) {
if (isset($convert) && $convert != '') {
return iconv('iso-8859-2', $convert, $this->author);
} else {
return $this->author;
}
}
public function setAuthor($author) {
$this->author = $author;
}
public function getDescription() {
return $this->description;
}
public function setDescription($description) {
$this->description = $description;
}
public function getIdSource() {
return $this->idSource;
}
public function setIdSource($idSource) {
$this->idSource = $idSource;
}
public function getSource() {
return $this->source;
}
public function setSource($source) {
$this->source = $source;
}
public function getPoints() {
return $this->points;
}
public function setPoints($points) {
$this->points = $points;
}
public function getWeight() {
return $this->weight;
}
public function setWeight($weight) {
$this->weight = $weight;
}
}
?>