Files
fdn2/private/lib/dao/models/BannerModel.php
T
Lorenzo Giacomelli 93ed2551c6 Nuovi banner lunghi
Creati nuovi banner lunghi
Aumentate numero notizie ansa
Aumentate numero notizie cronaca in homepage
fix mobile articolo per show player video
modifica amministrazione per show player mobile
2017-10-10 17:23:31 +02:00

47 lines
1014 B
PHP

<?php
class BannerModel extends HasMediaModel{
// const TYPE_IMAGE = 1;
// const TYPE_HTML = 2;
// public static $BANNER_TYPES = array(
// self::TYPE_IMAGE=>array("label"=>"Image"),
// self::TYPE_HTML=>array("label"=>"Html")
// );
const POSITION_HEAD = 1;
const POSITION_BODY = 2;
const POSITION_LONG = 3;
const GENERAL_CATEGORY = 0;
public static $BANNER_POSITIONS = array(
self::POSITION_HEAD=>array("label"=>"Testata"),
self::POSITION_BODY=>array("label"=>"Corpo"),
self::POSITION_LONG=>array("label"=>"Corpo Lungo")
);
public function __construct($saveableObject = null){
parent::__construct($saveableObject);
if (!$this->hasProperty("categories")){
$this->categories = array(self::GENERAL_CATEGORY);
}
}
public function __set($attr,$value){
if (strcmp("type", $attr)==0 || strcmp("position", $attr)==0){
$value = intval($value);
}
return parent::__set($attr, $value);
}
public static function getCollectionName(){
return "banner";
}
}
?>