/** * Overloaded load function, loads a specific row. * * @param mixed The primary key, if it is not specified the value of the current key is used * @return boolean True on success, false otherwise * @since 1.5.7 */ public function load($oid = null, $reset = true) { if (!parent::load($oid, $reset)) { return false; } // Store the current values of 'hidden' and 'in_hidden' in // order to be able to detect changes of this state later on $this->_hidden = $this->hidden; $this->_in_hidden = $this->in_hidden; return true; }
/** * Method to load a row from the database by primary key and bind the fields * to the JTable instance properties. * * @param mixed $keys An optional primary key value to load the row by, or an array of fields to match. If not * set the instance property value is used. * @param boolean $reset True to reset the default values before loading the new row. * * @return boolean True if successful. False if row not found. */ public function load($keys = null, $reset = true) { $dispatcher = RFactory::getDispatcher(); // Import plugin types if ($this->_eventBeforeLoad || $this->_eventAfterLoad) { foreach ($this->_pluginTypesToImport as $type) { JPluginHelper::importPlugin($type); } } // Trigger before load if ($this->_eventBeforeLoad) { $results = $dispatcher->trigger($this->_eventBeforeLoad, array($this, $keys, $reset)); if (count($results) && in_array(false, $results, true)) { return false; } } // Load if (!parent::load($keys, $reset)) { return false; } // Trigger after load if ($this->_eventAfterLoad) { $results = $dispatcher->trigger($this->_eventAfterLoad, array($this, $keys, $reset)); if (count($results) && in_array(false, $results, true)) { return false; } } return true; }
/** * Method to load a row from the database by primary key and bind the fields * to the JTable instance properties. * * @param mixed $keys An optional primary key value to load the row by, or an array of fields to match. If not * set the instance property value is used. * @param boolean $reset True to reset the default values before loading the new row. * * @return boolean True if successful. False if row not found. */ public function load($keys = null, $reset = true) { // Before load if (!$this->beforeLoad($keys, $reset)) { return false; } // Load if (!parent::load($keys, $reset)) { return false; } // After load if (!$this->afterLoad($keys, $reset)) { return false; } return true; }