summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-21 13:16:16 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-21 13:16:16 +0100
commit39d3bc61d81eae92d9615e898bc6dd6b658d71a6 (patch)
tree0914056875d52a085f31d7f7ff070b702c13d9cd /controller
parentdb5ba2b807c3765c9d23b46cd424d2215ed3fc1c (diff)
added all controllers
Diffstat (limited to 'controller')
-rw-r--r--controller/exportcontroller.php41
-rw-r--r--controller/feedcontroller.php12
-rw-r--r--controller/foldercontroller.php16
-rw-r--r--controller/itemcontroller.php46
-rw-r--r--controller/pagecontroller.php50
-rw-r--r--controller/usersettingscontroller.php46
6 files changed, 184 insertions, 27 deletions
diff --git a/controller/exportcontroller.php b/controller/exportcontroller.php
new file mode 100644
index 000000000..6c6d8a71c
--- /dev/null
+++ b/controller/exportcontroller.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+* ownCloud - News
+*
+* @author Alessandro Cosentino
+* @author Bernhard Posselt
+* @copyright 2012 Alessandro Cosentino cosenal@gmail.com
+* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+namespace OCA\News\Controller;
+
+use \OCA\AppFramework\Controller\Controller;
+use \OCA\AppFramework\Core\API;
+use \OCA\AppFramework\Http\Request;
+
+
+class ExportController extends Controller {
+
+
+ public function __construct(API $api, Request $request){
+ parent::__construct($api, $request);
+ }
+
+
+} \ No newline at end of file
diff --git a/controller/feedcontroller.php b/controller/feedcontroller.php
index 4357d7682..85de04665 100644
--- a/controller/feedcontroller.php
+++ b/controller/feedcontroller.php
@@ -40,16 +40,4 @@ class FeedController extends Controller {
$this->feedMapper = $feedMapper;
}
-
- /**
- * @IsAdminExemption
- * @IsSubAdminExemption
- * @Ajax
- *
- * Returns all feeds
- */
- public function getAll(){
- $feeds = $this->feedMapper->findAll();
- return $this->renderJSON($feeds);
- }
} \ No newline at end of file
diff --git a/controller/foldercontroller.php b/controller/foldercontroller.php
index 1bf7da664..3e631eb63 100644
--- a/controller/foldercontroller.php
+++ b/controller/foldercontroller.php
@@ -46,10 +46,8 @@ class FolderController extends Controller {
* @IsAdminExemption
* @IsSubAdminExemption
* @Ajax
- *
- * Returns all folders
*/
- public function getAll(){
+ public function folders(){
$folders = $this->folderBl->findAll($this->api->getUserId());
$result = array(
'folders' => $folders
@@ -62,20 +60,8 @@ class FolderController extends Controller {
* @IsAdminExemption
* @IsSubAdminExemption
* @Ajax
- *
- * Collapses a folder
*/
public function collapse(){
- $folderId = (int) $this->params('folderId');
-
- try {
- $this->folderMapper->setCollapsed($folderId, true);
- return $this->renderJSON(array());
- } catch (DoesNotExistException $e) {
- return $this->renderJSON(array(), $e->getMessage());
- } catch(MultipleObjectsReturnedException $e){
- return $this->renderJSON(array(), $e->getMessage());
- }
}
diff --git a/controller/itemcontroller.php b/controller/itemcontroller.php
new file mode 100644
index 000000000..81e3dd972
--- /dev/null
+++ b/controller/itemcontroller.php
@@ -0,0 +1,46 @@
+<?php
+
+/**
+* ownCloud - News
+*
+* @author Alessandro Cosentino
+* @author Bernhard Posselt
+* @copyright 2012 Alessandro Cosentino cosenal@gmail.com
+* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+namespace OCA\News\Controller;
+
+use \OCA\AppFramework\Controller\Controller;
+use \OCA\AppFramework\Core\API;
+use \OCA\AppFramework\Http\Request;
+
+use \OCA\News\Bl\ItemBl;
+
+
+class ItemController extends Controller {
+
+ private $itemBl;
+
+ public function __construct(API $api, Request $request, ItemBl $itemBl){
+ parent::__construct($api, $request);
+ $this->itemBl = $itemBl
+ }
+
+
+
+} \ No newline at end of file
diff --git a/controller/pagecontroller.php b/controller/pagecontroller.php
new file mode 100644
index 000000000..cf934422b
--- /dev/null
+++ b/controller/pagecontroller.php
@@ -0,0 +1,50 @@
+<?php
+
+/**
+* ownCloud - News
+*
+* @author Alessandro Cosentino
+* @author Bernhard Posselt
+* @copyright 2012 Alessandro Cosentino cosenal@gmail.com
+* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+namespace OCA\News\Controller;
+
+use \OCA\AppFramework\Controller\Controller;
+use \OCA\AppFramework\Core\API;
+use \OCA\AppFramework\Http\Request;
+
+
+class PageController extends Controller {
+
+
+ public function __construct(API $api, Request $request){
+ parent::__construct($api, $request);
+ }
+
+
+ /**
+ * @IsAdminExemption
+ * @IsSubAdminExemption
+ * @CSRFExemption
+ */
+ public function index() {
+ }
+
+
+} \ No newline at end of file
diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php
new file mode 100644
index 000000000..fd77a394f
--- /dev/null
+++ b/controller/usersettingscontroller.php
@@ -0,0 +1,46 @@
+<?php
+
+/**
+* ownCloud - News
+*
+* @author Alessandro Cosentino
+* @author Bernhard Posselt
+* @copyright 2012 Alessandro Cosentino cosenal@gmail.com
+* @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+* License as published by the Free Software Foundation; either
+* version 3 of the License, or any later version.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+*
+* You should have received a copy of the GNU Affero General Public
+* License along with this library. If not, see <http://www.gnu.org/licenses/>.
+*
+*/
+
+namespace OCA\News\Controller;
+
+use \OCA\AppFramework\Controller\Controller;
+use \OCA\AppFramework\Core\API;
+use \OCA\AppFramework\Http\Request;
+
+use \OCA\News\Bl\FeedBl;
+
+
+class FeedController extends Controller {
+
+ private $feedBl;
+
+ public function __construct(API $api, Request $request, FeedBl $feedBl){
+ parent::__construct($api, $request);
+ $this->feedBl = $feedBl
+ }
+
+
+
+} \ No newline at end of file