90 lines
2.1 KiB
PHP
90 lines
2.1 KiB
PHP
<?php
|
|
|
|
class Reassurances extends ObjectModel
|
|
{
|
|
public $id_cyb;
|
|
public $fichier_cyb;
|
|
public $titre_cyb;
|
|
public $lien_cyb;
|
|
// public $order_cyb;
|
|
|
|
public static $definition = array(
|
|
'table' => 'cyb_reassurance',
|
|
'primary' => 'id_cyb',
|
|
'multilang' => false,
|
|
'fields' => array (
|
|
'fichier_cyb' => array('type' => self::TYPE_STRING, 'required' => false),
|
|
'lien_cyb' => array('type' => self::TYPE_STRING, 'required' => false),
|
|
'titre_cyb' => array('type' => self::TYPE_HTML, 'required' => false),
|
|
// 'position' => array('type' => self::TYPE_INT, 'required' => false),
|
|
)
|
|
);
|
|
|
|
public function __construct($id = null)
|
|
{
|
|
parent::__construct($id, null, null);
|
|
}
|
|
|
|
public static function reassuranceExists($id = null)
|
|
{
|
|
if (! $id || ! is_numeric($id)) {
|
|
return false;
|
|
}
|
|
|
|
$req = 'SELECT id_cyb as id
|
|
FROM '._DB_PREFIX_.'cyb_reassurance
|
|
WHERE id_cyb = '.(int)$id;
|
|
$row = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($req);
|
|
|
|
return ($row);
|
|
}
|
|
|
|
public function getId()
|
|
{
|
|
return $this->id_cyb;
|
|
}
|
|
|
|
public function getTitre()
|
|
{
|
|
return $this->titre_cyb;
|
|
}
|
|
|
|
public function setTitre($titre = null)
|
|
{
|
|
$this->titre_cyb = $titre;
|
|
return $this;
|
|
}
|
|
|
|
public function getLien()
|
|
{
|
|
return $this->lien_cyb;
|
|
}
|
|
|
|
public function setLien($lien = null)
|
|
{
|
|
$this->lien_cyb = $lien;
|
|
return $this;
|
|
}
|
|
|
|
public function getFichier()
|
|
{
|
|
return $this->fichier_cyb;
|
|
}
|
|
|
|
public function setFichier($fichier = null)
|
|
{
|
|
$this->fichier_cyb = $fichier;
|
|
return $this;
|
|
}
|
|
|
|
// public function getOrder()
|
|
// {
|
|
// return $this->order_cyb;
|
|
// }
|
|
//
|
|
// public function setOrder($order_cyb = null)
|
|
// {
|
|
// $this->order_cyb = $order_cyb;
|
|
// return $this;
|
|
// }
|
|
} |