Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 6834f7b

Browse files
committed
remove getProperties() as its unused atm
1 parent a760557 commit 6834f7b

File tree

3 files changed

+7
-60
lines changed

3 files changed

+7
-60
lines changed

Controller/TreeBrowserController.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,6 @@ public function childrenAction(Request $request)
5252
return new JsonResponse($this->tree->getChildren($path));
5353
}
5454

55-
/**
56-
* TODO: make this formAction to get an edit form for the node specified in root
57-
*
58-
* @param Request $request containing the parameter 'root' for which to get
59-
* the children
60-
*
61-
* @return Response
62-
*/
63-
public function propertiesAction(Request $request)
64-
{
65-
$path = $request->query->get('root');
66-
67-
if (empty($path)) {
68-
$path = '/';
69-
}
70-
71-
return new JsonResponse($this->tree->getProperties($path));
72-
}
73-
7455
/**
7556
* Handle request to move a node from src to target path.
7657
*

Tree/PHPCRTree.php

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,44 +50,12 @@ public function getChildren($path)
5050
return $children;
5151
}
5252

53-
public function getProperties($path)
54-
{
55-
$node = $this->session->getNode($path);
56-
$properties = array();
57-
58-
foreach ($node->getProperties() as $name => $property) {
59-
$entry = array(
60-
"name" => $name,
61-
"type" => PropertyType::nameFromValue($property->getType())
62-
);
63-
switch ($property->getType()) {
64-
case PropertyType::BINARY:
65-
break;
66-
case PropertyType::BOOLEAN:
67-
case PropertyType::DATE:
68-
case PropertyType::DECIMAL:
69-
case PropertyType::DOUBLE:
70-
case PropertyType::LONG:
71-
case PropertyType::NAME:
72-
case PropertyType::STRING:
73-
case PropertyType::URI:
74-
$entry['value'] = $property->getString();
75-
break;
76-
case PropertyType::PATH:
77-
case PropertyType::WEAKREFERENCE:
78-
case PropertyType::REFERENCE:
79-
$entry['value'] = $property->getPath();
80-
}
81-
82-
// TODO: handle PATH/(WEAK)REFERENCE in frontend
83-
// TODO: handle BINARY in frontend (no value)
84-
$properties[] = $entry;
85-
}
86-
87-
return $properties;
88-
}
89-
90-
// TODO: this should be part of the interface. and the target should include the name to allow renames
53+
/**
54+
* @param string $moved_path
55+
* @param string $target_path
56+
*
57+
* @return array
58+
*/
9159
public function move($moved_path, $target_path)
9260
{
9361
$resulting_path = $target_path.'/'.PathHelper::getNodeName($moved_path);
@@ -105,6 +73,7 @@ public function move($moved_path, $target_path)
10573
* @param string $moved the id of the child being moved
10674
* @param string $target the id of the target node
10775
* @param bool $before insert before or after the target
76+
*
10877
* @return void
10978
*/
11079
public function reorder($parent, $moved, $target, $before)

Tree/TreeInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ public function getAlias();
5858
/**
5959
* Get an array describing the available node types
6060
*
61-
* Example:
62-
* TODO
63-
*
6461
* @return array
6562
*/
6663
public function getNodeTypes();

0 commit comments

Comments
 (0)