/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('category_name')); }
/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('season_name')); }
/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('param1_name', 'description')); }
/** * Borra registro, verificando que no haya problemas de integridad referencial * * @return true if successful otherwise returns false */ function delete($oid = null) { $key = $this->getKeyName(); $id = $this->{$key}; if ($oid) { $this->{$key} = $oid; } $id = $this->{$key}; $this->load($id, false); $result = parent::delete($oid); // Precalcular precios y disponibilidad if ($result && $this->product_id) { // Determina si el precio desde de la disponibilidad se calcula por las vigencias o // se toma de la configuración del tarifario. Colocar en 1 para usar las vigencias. $calculatePrices = 0; $query = 'CALL GenerateTransfersRateResumeById(' . $this->product_id . ', CURDATE(), ADDDATE(CURDATE(), 365), ' . $calculatePrices . ')'; $this->_db->setQuery($query); if (!$this->_db->query()) { $this->setError($this->_db->getErrorMsg()); $result = false; } } return $result; }
/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('product_name', 'product_code', 'product_desc')); }
/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('country_name', 'country_code')); }
/** * Constructor * * @param object Database connector object * @since 1.0 */ function __construct(&$db) { // Las relaciones siempre se deben definir antes de llamar al contructor del padre // Para una guía en definición de relaciones, ir a basictable.php $this->relations = array(); // Agregar relación con cada tipo de producto $modelProducts =& JModel::getInstance('producttype', 'CatalogoPlanesModel'); $productTypes = $modelProducts->getActiveProductTypesInfo(); $productTypeWithoutTourismTypes = array('transfers', 'cars'); if (is_array($productTypes)) { foreach ($productTypes as $type) { $code = $type->product_type_code; if (in_array($code, $productTypeWithoutTourismTypes)) { continue; } $this->relations[$code] = array(); $this->relations[$code]['referencedtable'] = '#__cp_' . $type->product_type_code . '_tourismtype'; $this->relations[$code]['referencedfield'] = 'tourismtype_id'; $this->relations[$code]['referencedtableid'] = 'product_id'; $this->relations[$code]['selectable'] = false; $this->relations[$code]['manualinsert'] = true; } } $this->relations['supplements'] = array(); $this->relations['supplements']['referencedtable'] = '#__cp_prm_supplement_tourismtype'; $this->relations['supplements']['referencedfield'] = 'tourismtype_id'; $this->relations['supplements']['referencedtableid'] = 'supplement_id'; $this->relations['supplements']['selectable'] = false; $this->relations['supplements']['manualinsert'] = true; parent::__construct('#__cp_prm_tourismtype', 'tourismtype_id', $db); }
/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('supplement_name', 'supplement_code', 'description')); }
/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('region_name', 'region_code')); }
/** * Binds a named array/hash to this object * * Can be overloaded/supplemented by the child class * * @access public * @param $from mixed An associative array or object * @param $ignore mixed An array or space separated list of fields not to bind * @return boolean */ public function bind($from, $ignore = array()) { return parent::bind($from, $ignore, array('supplier_name', 'supplier_code', 'phone', 'fax', 'url', 'email')); }