Skip to content

Commit 42e6e11

Browse files
committed
Show primary node type + super node types
1 parent c351bb8 commit 42e6e11

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dev-master
1919

2020
### Enhancements
2121

22+
- [node:list] Show primary node type and super-types
2223
- [node:list] Show property length
2324
- [autocomplete] Autocomplete now includes command names
2425
- [references] Show UUIDs when listing reference properties

features/all/phpcr_node_list.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,23 @@ Feature: List properites and chidren of current nodeA
9292
Then the command should not fail
9393
And I should see the following:
9494
"""
95-
/tests_general_base/index.txt
95+
/tests_general_base/index.txt [nt:file] > nt:hierarchyNode
9696
+-------------+-----------------+--+
9797
| jcr:content | nt:unstructured | |
9898
+-------------+-----------------+--+
99-
/tests_general_base/idExample
99+
/tests_general_base/idExample [nt:file] > nt:hierarchyNode
100100
+--------------+-----------------+--+
101101
| jcr:content/ | nt:unstructured | |
102102
+--------------+-----------------+--+
103-
/tests_general_base/numberPropertyNode
103+
/tests_general_base/numberPropertyNode [nt:file] > nt:hierarchyNode
104104
+-------------+-----------------+--+
105105
| jcr:content | nt:unstructured | |
106106
+-------------+-----------------+--+
107-
/tests_general_base/NumberPropertyNodeToCompare1
107+
/tests_general_base/NumberPropertyNodeToCompare1 [nt:file] > nt:hierarchyNode
108108
+-------------+-----------------+--+
109109
| jcr:content | nt:unstructured | |
110110
+-------------+-----------------+--+
111-
/tests_general_base/NumberPropertyNodeToCompare2
111+
/tests_general_base/NumberPropertyNodeToCompare2 [nt:file] > nt:hierarchyNode
112112
+-------------+-----------------+--+
113113
| jcr:content | nt:unstructured | |
114114
+-------------+-----------------+--+

features/all/phpcr_version_restore.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ Feature: Restore a version
2121
And I execute the "ls" command
2222
Then I should see the following:
2323
"""
24-
| foo | STRING | inital
24+
| foo | STRING (9) | initalbar
2525
"""

src/PHPCR/Shell/Console/Command/Phpcr/NodeListCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ public function execute(InputInterface $input, OutputInterface $output)
100100
$this->renderNode($node, $table, array(), $filter);
101101

102102
if ($table->getNumberOfRows() > 0) {
103-
$output->writeln('<path>' . $node->getPath() . '</path>');
103+
$output->writeln(sprintf('<path>%s</path> [%s] > %s',
104+
$node->getPath(),
105+
$node->getPrimaryNodeType()->getName(),
106+
implode(', ', $node->getPrimaryNodeType()->getDeclaredSupertypeNames())
107+
));
104108
$table->render($output);
105109
}
106110
}

0 commit comments

Comments
 (0)