Fix editor date
Signed-off-by: Riccardo Di Dato <r.didato@asdynamics.it>
This commit is contained in:
@@ -67,6 +67,18 @@ class NotiziaModel extends HasMediaModel{
|
||||
self::CATEGORY_CONSIGLI_ESPERTI=>array("label"=>"I consigli degli esperti","mainMenu"=>false, "hidden"=>false,"pages"=>array("list"=>"consigliEsperti.php"),"color"=>"#3e3e3e","isSubmenu"=>null),
|
||||
);
|
||||
|
||||
public function __construct($saveableObject){
|
||||
parent::__construct($saveableObject);
|
||||
|
||||
if (!$this->hasProperty("about")){
|
||||
$this->about = new stdClass();
|
||||
}
|
||||
|
||||
if (!property_exists($this->about, "data") || !($this->about->date instanceof MongoDB\BSON\UTCDateTime) ){
|
||||
$this->about->date = new MongoDB\BSON\UTCDateTime( time() * 1000 );
|
||||
}
|
||||
}
|
||||
|
||||
public static function getCollectionName(){
|
||||
return "notizia";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user