Skip to content

Instantly share code, notes, and snippets.

@m1k3lm
Last active June 29, 2021 18:29
Show Gist options
  • Save m1k3lm/ac2a817685860eb471095fbd090b2589 to your computer and use it in GitHub Desktop.
Save m1k3lm/ac2a817685860eb471095fbd090b2589 to your computer and use it in GitHub Desktop.
class DummyObjectModel extends ObjectModel
{
public $force_id = true;
public static $definition = array(
'table' => 'dummy',
'primary' => 'id',
'multilang' => false,
'fields' => array(
'id' => array(
'type' => self::TYPE_INT,
'validate' => 'isUnsignedId',
'required' => true
),
'dummy' => array(
'type' => self::TYPE_STRING,
'validate' => 'isGenericName',
'required' => true
),
),
);
public function __construct($id = null, $id_lang = null, $id_shop = null)
{
parent::__construct($id, $id_lang, $id_shop);
$this->id = $id;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment