From e7c6bfbfc3e4eb72ff7e25e5b4dd506bef4bc92a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 21 Jul 2015 15:12:46 +0200 Subject: [PATCH] ImportsourceTable: initial import refs #9676 --- application/tables/ImportsourceTable.php | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 application/tables/ImportsourceTable.php diff --git a/application/tables/ImportsourceTable.php b/application/tables/ImportsourceTable.php new file mode 100644 index 00000000..d198bfbb --- /dev/null +++ b/application/tables/ImportsourceTable.php @@ -0,0 +1,42 @@ + 's.id', + 'source_name' => 's.source_name', + 'provider_class' => 's.provider_class', + ); + } + + protected function getActionUrl($row) + { + return $this->url('director/importsource/edit', array('id' => $row->id)); + } + + public function getTitles() + { + $view = $this->view(); + return array( + 'source_name' => $view->translate('Source name'), + ); + } + + public function fetchData() + { + $db = $this->connection()->getConnection(); + + $query = $db->select()->from( + array('s' => 'import_source'), + $this->getColumns() + )->order('source_name ASC'); + + return $db->fetchAll($query); + } +}