1
1
<?php
2
2
3
+ /*
4
+ * This file is part of the Symfony CMF package.
5
+ *
6
+ * (c) 2011-2015 Symfony CMF
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
3
12
namespace Symfony \Cmf \Bundle \TreeBrowserBundle \Controller ;
4
13
14
+ use Symfony \Cmf \Bundle \TreeBrowserBundle \Tree \TreeInterface ;
15
+ use Symfony \Component \HttpFoundation \JsonResponse ;
5
16
use Symfony \Component \HttpFoundation \Request ;
6
17
use Symfony \Component \HttpFoundation \Response ;
7
- use Symfony \Component \HttpFoundation \JsonResponse ;
8
-
9
- use Symfony \Cmf \Bundle \TreeBrowserBundle \Tree \TreeInterface ;
10
18
11
19
/**
12
20
* Frontend to the TreeInterface, allowing to fetch children, get an edit form
@@ -23,7 +31,7 @@ class TreeBrowserController
23
31
protected $ tree ;
24
32
25
33
/**
26
- * Create the controller
34
+ * Create the controller.
27
35
*
28
36
* @param TreeInterface $tree the tree to operate on
29
37
*/
@@ -33,13 +41,13 @@ public function __construct(TreeInterface $tree)
33
41
}
34
42
35
43
/**
36
- * Get a json encoded list of children the specified node has
44
+ * Get a json encoded list of children the specified node has.
37
45
*
38
46
* @param Request $request containing the parameter 'root' for which to get
39
- * the children
47
+ * the children
40
48
*
41
49
* @return Response json encoded list of child nodes of the specified root
42
- * node.
50
+ * node.
43
51
*/
44
52
public function childrenAction (Request $ request )
45
53
{
@@ -58,10 +66,10 @@ public function childrenAction(Request $request)
58
66
* Should only be configured for POST requests to avoid manipulations.
59
67
*
60
68
* @param Request $request with the parameters dropped and target,
61
- * containing the path to move from resp. to
69
+ * containing the path to move from resp. to
62
70
*
63
71
* @return Response returning a plain text result with the new path of the
64
- * node.
72
+ * node.
65
73
*/
66
74
public function moveAction (Request $ request )
67
75
{
@@ -77,10 +85,10 @@ public function moveAction(Request $request)
77
85
* Should only be configured for POST requests to avoid manipulations.
78
86
*
79
87
* @param Request $request with the parameters dropped and target,
80
- * containing the path to move from resp. to
88
+ * containing the path to move from resp. to
81
89
*
82
90
* @return Response returning a plain text result with the new path of the
83
- * node.
91
+ * node.
84
92
*/
85
93
public function reorderAction (Request $ request )
86
94
{
0 commit comments