public function indexAction()
 {
     $connection = Tools::getConnection();
     $this->_prepareVersions();
     $tables = array('all' => 'All');
     $result = $connection->query("SHOW TABLES");
     $result->setFetchMode(Phalcon\DB::FETCH_NUM);
     while ($table = $result->fetchArray($result)) {
         $tables[$table[0]] = $table[0];
     }
     $this->view->setVar('tables', $tables);
 }
 public function indexAction()
 {
     $config = Tools::getConfig();
     $connection = Tools::getConnection();
     $tables = array();
     $result = $connection->query("SHOW TABLES");
     $result->setFetchMode(Phalcon\Db::FETCH_NUM);
     while ($table = $result->fetchArray($result)) {
         $tables[$table[0]] = $table[0];
     }
     $this->view->setVar('tables', $tables);
     $this->view->setVar('databaseName', $config->database->name);
 }
 protected function _listTables($all = false)
 {
     $config = Tools::getConfig();
     $connection = Tools::getConnection();
     if ($all) {
         $tables = array('all' => 'All');
     } else {
         $tables = array();
     }
     $dbTables = $connection->listTables();
     foreach ($dbTables as $dbTable) {
         $tables[$dbTable] = $dbTable;
     }
     $this->view->tables = $tables;
     if ($config->database->adapter != 'Sqlite') {
         $this->view->databaseName = $config->database->dbname;
     } else {
         $this->view->databaseName = null;
     }
 }
 /**
  * List database tables
  *
  * @param  bool $all
  * @return void
  */
 protected function listTables($all = false)
 {
     $config = Tools::getConfig();
     $connection = Tools::getConnection();
     if ($all) {
         $tables = array('all' => 'All');
     } else {
         $tables = array();
     }
     $dbTables = $connection->listTables();
     foreach ($dbTables as $dbTable) {
         $tables[$dbTable] = $dbTable;
     }
     $this->view->tables = $tables;
     $this->view->databaseName = $config->database->dbname;
     if ($this->migrationsDir) {
         $this->view->migrationsDir = $this->migrationsDir;
     } else {
         $this->view->migrationsDir = null;
     }
 }