Skip to content

Commit 692e317

Browse files
committed
Merge pull request #67 from Flowpack/fix-nodetype-show
[BUGFIX] nodetype:show uses undefined method getFullConfiguration()
2 parents 6cc227e + 63979ad commit 692e317

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Command/NodeTypeCommandController.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,24 @@ class NodeTypeCommandController extends CommandController {
3030
protected $nodeTypeManager;
3131

3232
/**
33-
* show a single node type after applying all supertypes etc
33+
* Show node type configuration after applying all supertypes etc
3434
*
3535
* @param string $nodeType the node type to optionally filter for
36+
* @return void
3637
*/
3738
public function showCommand($nodeType = NULL) {
38-
$configuration = $this->nodeTypeManager->getFullConfiguration();
3939

4040
if ($nodeType !== NULL) {
41-
$configuration = $configuration[$nodeType];
41+
/** @var \TYPO3\TYPO3CR\Domain\Model\NodeType $nodeType */
42+
$nodeType = $this->nodeTypeManager->getNodeType($nodeType);
43+
$configuration = $nodeType->getFullConfiguration();
44+
} else {
45+
$nodeTypes = $this->nodeTypeManager->getNodeTypes();
46+
$configuration = array();
47+
/** @var \TYPO3\TYPO3CR\Domain\Model\NodeType $nodeType */
48+
foreach ($nodeTypes as $nodeTypeName => $nodeType) {
49+
$configuration[$nodeTypeName] = $nodeType->getFullConfiguration();
50+
}
4251
}
4352
$this->output(\Symfony\Component\Yaml\Yaml::dump($configuration, 5, 2));
4453
}

0 commit comments

Comments
 (0)