1 | <?php |
||
22 | class TreeController extends Controller |
||
23 | { |
||
24 | /** |
||
25 | * @var TreeInterface |
||
26 | */ |
||
27 | private $tree; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $template = 'SonataDoctrinePHPCRAdminBundle:Tree:tree.html.twig'; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | private $defaults; |
||
38 | |||
39 | /** |
||
40 | * @var boolean |
||
41 | */ |
||
42 | private $confirmMove = false; |
||
43 | |||
44 | /** |
||
45 | * @param TreeInterface $tree |
||
46 | * @param string $template |
||
47 | * @param array $defaults |
||
48 | * @param boolean $confirmMove |
||
49 | */ |
||
50 | public function __construct(TreeInterface $tree, $template = null, array $defaults = array(), $confirmMove = false) |
||
60 | |||
61 | /** |
||
62 | * Renders a tree, passing the routes for each of the admin types (document types) |
||
63 | * to the view |
||
64 | * |
||
65 | * @param Request $request |
||
66 | * |
||
67 | * @return Response |
||
68 | */ |
||
69 | public function treeAction(Request $request) |
||
89 | } |
||
90 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: