public function countSelect(SelectObject $selectObj) { $out = "SELECT COUNT(*) AS size "; $out .= "FROM " . implode(",", $selectObj->getTables()) . " "; $out .= "WHERE " . $selectObj->getWhereSentence(); #echo "<br>--------".$out; Logger::log($out, __FILE__, __CLASS__, __METHOD__, __LINE__); $res = $this->connection->performQuery($out); if (!$res) { return null; } $res = pg_fetch_all($res); if (!$res) { return null; } return $res; }
/** * @return void */ public function initializeObject() { parent::initializeObject(); $this->remove('items'); $this->remove('customItems'); $tables = array_keys($GLOBALS['TCA']); sort($tables); $items = array_combine($tables, $tables); $this->createField('Select', 'table')->setItems($items); }