Skip to content

Commit 7a55fb7

Browse files
committed
[TASK] Use NodeInterface instead of Node
1 parent 3575884 commit 7a55fb7

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer/NodeIndexer.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Flowpack\ElasticSearch\Domain\Model\Document as ElasticSearchDocument;
1818
use Flowpack\ElasticSearch\Domain\Model\Index;
1919
use TYPO3\Flow\Annotations as Flow;
20-
use TYPO3\TYPO3CR\Domain\Model\Node;
20+
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
2121
use TYPO3\TYPO3CR\Domain\Service\NodeTypeManager;
2222
use TYPO3\TYPO3CR\Search\Indexer\AbstractNodeIndexer;
2323

@@ -132,12 +132,12 @@ public function getIndex() {
132132
/**
133133
* index this node, and add it to the current bulk request.
134134
*
135-
* @param Node $node
135+
* @param NodeInterface $node
136136
* @param string $targetWorkspaceName In case this is triggered during publishing, a workspace name will be passed in
137137
* @return void
138138
* @throws \TYPO3\TYPO3CR\Search\Exception\IndexingException
139139
*/
140-
public function indexNode(Node $node, $targetWorkspaceName = NULL) {
140+
public function indexNode(NodeInterface $node, $targetWorkspaceName = NULL) {
141141
$contextPath = $node->getContextPath();
142142

143143
if ($targetWorkspaceName !== NULL) {
@@ -230,12 +230,12 @@ public function indexNode(Node $node, $targetWorkspaceName = NULL) {
230230
/**
231231
*
232232
*
233-
* @param Node $node
233+
* @param NodeInterface $node
234234
* @param array $fulltextIndexOfNode
235235
* @param string $targetWorkspaceName
236236
* @return void
237237
*/
238-
protected function updateFulltext(Node $node, array $fulltextIndexOfNode, $targetWorkspaceName = NULL) {
238+
protected function updateFulltext(NodeInterface $node, array $fulltextIndexOfNode, $targetWorkspaceName = NULL) {
239239
if ((($targetWorkspaceName !== NULL && $targetWorkspaceName !== 'live') || $node->getWorkspace()->getName() !== 'live') || count($fulltextIndexOfNode) === 0) {
240240
return;
241241
}
@@ -306,10 +306,10 @@ protected function updateFulltext(Node $node, array $fulltextIndexOfNode, $targe
306306
/**
307307
* Whether the node is configured as fulltext root.
308308
*
309-
* @param Node $node
309+
* @param NodeInterface $node
310310
* @return boolean
311311
*/
312-
protected function isFulltextRoot(Node $node) {
312+
protected function isFulltextRoot(NodeInterface $node) {
313313
if ($node->getNodeType()->hasConfiguration('search')) {
314314
$elasticSearchSettingsForNode = $node->getNodeType()->getConfiguration('search');
315315
if (isset($elasticSearchSettingsForNode['fulltext']['isRoot']) && $elasticSearchSettingsForNode['fulltext']['isRoot'] === TRUE) {
@@ -323,10 +323,10 @@ protected function isFulltextRoot(Node $node) {
323323
/**
324324
* Schedule node removal into the current bulk request.
325325
*
326-
* @param Node $node
326+
* @param NodeInterface $node
327327
* @return string
328328
*/
329-
public function removeNode(Node $node) {
329+
public function removeNode(NodeInterface $node) {
330330
// TODO: handle deletion from the fulltext index as well
331331
$identifier = sha1($node->getContextPath());
332332

0 commit comments

Comments
 (0)