Files
2019-11-17 19:14:07 +01:00

67 lines
1.6 KiB
PHP

<?php
class Bannieretexte extends ObjectModel
{
public $id_cyb;
public $texte_1_cyb;
public $texte_2_cyb;
// public $order_cyb;
public static $definition = array(
'table' => 'cyb_bannieretexte',
'primary' => 'id_cyb',
'multilang' => false,
'fields' => array (
'texte_1_cyb' => array('type' => self::TYPE_STRING, 'required' => false),
'texte_2_cyb' => array('type' => self::TYPE_STRING, 'required' => false),
// 'position' => array('type' => self::TYPE_INT, 'required' => false),
)
);
public function __construct($id = null)
{
parent::__construct($id, null, null);
}
public static function bannieretexteExists($id = null)
{
if (! $id || ! is_numeric($id)) {
return false;
}
$req = 'SELECT id_cyb as id
FROM '._DB_PREFIX_.'cyb_bannieretexte
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 getTexte1()
{
return $this->texte_1_cyb;
}
public function setTexte1($texte1 = null)
{
$this->texte_1_cyb = $texte1;
return $this;
}
public function getTexte2()
{
return $this->texte_2_cyb;
}
public function setTexte2($texte2 = null)
{
$this->texte_2_cyb = $texte2;
return $this;
}
}