/** * Load search criteria. * * @param string $name name of the search criteria * * @return array search criteria */ public function loadCriteria($name) { if (!$this->tableExist()) { return []; } $db = $this->m_node->getDb(); $query = "SELECT c.criteria FROM {$this->m_table} c WHERE c.nodetype = '%s' AND UPPER(c.name) = UPPER('%s') AND handlertype = '%s'"; Tools::atk_var_dump(sprintf($query, $this->m_node->atkNodeUri(), Tools::escapeSQL($name), $this->getSearchHandlerType()), 'loadCriteria query'); list($row) = $db->getRows(sprintf($query, $this->m_node->atkNodeUri(), Tools::escapeSQL($name), $this->getSearchHandlerType())); $criteria = $row == null ? null : unserialize($row['criteria']); Tools::atk_var_dump($criteria, 'loadCriteria criteria'); return $criteria; }