/**
  * 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;
     if ($config->database->adapter != 'Sqlite') {
         $this->view->databaseName = $config->database->dbname;
     } else {
         $this->view->databaseName = null;
     }
 }