本文整理汇总了PHP中JTableNested::load方法的典型用法代码示例。如果您正苦于以下问题:PHP JTableNested::load方法的具体用法?PHP JTableNested::load怎么用?PHP JTableNested::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JTableNested
的用法示例。
在下文中一共展示了JTableNested::load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
/**
* 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;
}
示例2: load
/**
* 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;
}
示例3: load
/**
* 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;
}