Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla5/administrator/components/com_fabrik/tables/ |
| [Home] [System Details] [Kill Me] |
<?php
/**
* Visualization Fabrik Table
*
* @package Joomla
* @subpackage Fabrik
* @copyright Copyright (C) 2005-2020 Media A-Team, Inc. - All rights
reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Table\Table;
use \Joomla\Registry\Registry;
/**
* Visualization Fabrik Table
*
* @package Joomla
* @subpackage Fabrik
* @since 3.0
*/
class FabrikTableVisualization extends Table
{
/**
* Constructor
*
* @param JDatabaseDriver &$db database object
*/
public function __construct(&$db)
{
parent::__construct('#__fabrik_visualizations', 'id',
$db);
}
/**
* Method to bind an associative array or object to the Table
instance.This
* method only binds properties that are publicly accessible and
optionally
* takes an array of properties to ignore when binding.
*
* @param mixed $src An associative array or object to bind to the
Table instance.
* @param mixed $ignore An optional array or space separated list of
properties to ignore while binding.
*
* @return boolean True on success.
*/
public function bind($src, $ignore = array())
{
if (isset($src['params']) &&
is_array($src['params']))
{
$registry = new Registry;
$registry->loadArray($src['params']);
$src['params'] = (string) $registry;
}
parent::bind($src, $ignore);
return true;
}
/**
* Method to store a row in the database from the Table instance
properties.
* If a primary key value is set the row with that primary key value will
be
* updated with the instance property values. If no primary key value is
set
* a new row will be inserted into the database with the properties from
the
* Table instance.
*
* @param boolean $updateNulls True to update fields even if they are
null.
*
* @return boolean True on success.
*
* @link http://docs.joomla.org/Table/store
* @since 11.1
*/
public function store($updateNulls = true)
{
//return parent::store($updateNulls);
if (!parent::store($updateNulls))
{
throw new RuntimeException('Fabrik error storing visualisation
data: ' . $this->getError());
}
return true;
}
}