Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neos9 compatible #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Classes/LazyDataSourceTrait.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?php
namespace Sandstorm\LazyDataSource;

use Neos\ContentRepository\Domain\Model\NodeInterface;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;

trait LazyDataSourceTrait
{

/**
* @param NodeInterface $node The node that is currently edited (optional)
* @param Node $node The node that is currently edited (optional)
* @param array $arguments Additional arguments (key / value)
* @return array
*/
public function getData(NodeInterface $node = null, array $arguments = [])
public function getData(Node $node = null, array $arguments = [])
{
if (isset($arguments['identifiers'])) {
$identifiers = $arguments['identifiers'];
Expand All @@ -31,19 +31,19 @@ public function getData(NodeInterface $node = null, array $arguments = [])
* these data records specifically.
*
* @param array $identifiers
* @param NodeInterface|null $node
* @param Node|null $node
* @param array $arguments
* @return mixed
*/
abstract protected function getDataForIdentifiers(array $identifiers, NodeInterface $node = null, array $arguments = []);
abstract protected function getDataForIdentifiers(array $identifiers, Node $node = null, array $arguments = []);

/**
* This method is called when the user specifies a search term.
*
* @param string $searchTerm
* @param NodeInterface|null $node
* @param Node|null $node
* @param array $arguments
* @return mixed
*/
abstract protected function searchData(string $searchTerm, NodeInterface $node = null, array $arguments = []);
abstract protected function searchData(string $searchTerm, Node $node = null, array $arguments = []);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default () => WrappedComponent => {
@neos(globalRegistry => ({
lazyDataSourceDataLoader: globalRegistry.get('dataLoaders').get('SandstormLazyDataSourceLoader')
}))
// TODO ``$transform`` throws console error while in Neos BE
@connect($transform({
focusedNodePath: selectors.CR.Nodes.focusedNodePathSelector
}))
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"source": "https://github.com/sandstorm/LazyDataSource"
},
"require": {
"neos/neos-ui": "^7.3 || ^8.3"
"neos/neos-ui": "^7.3 || ^8.3 || ^9.0"
},
"autoload": {
"psr-4": {
Expand Down