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

[TASK] Neos 3.x compatibility #3

Open
wants to merge 1 commit 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* This script belongs to the Flow package "JohannesSteu.Neos.News". *
* */

use TYPO3\Eel\FlowQuery\Operations\AbstractOperation;
use TYPO3\Eel\FlowQuery\FlowQuery;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Annotations as Flow;
use Neos\ContentRepository\Domain\Model\NodeInterface;

/**
* EEL operation to Build a date filter for news. This operation returns an array with all dates that can be
Expand Down Expand Up @@ -40,7 +40,7 @@ class DateFilterOperation extends AbstractOperation
/**
* {@inheritdoc}
*
* We can only handle TYPO3CR Nodes.
* We can only handle NeosCR Nodes.
*
* @param mixed $context
* @return boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* This script belongs to the Flow package "JohannesSteu.Neos.News". *
* */

use TYPO3\Eel\FlowQuery\Operations\AbstractOperation;
use TYPO3\Eel\FlowQuery\FlowQuery;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Annotations as Flow;
use Neos\ContentRepository\Domain\Model\NodeInterface;

/**
* EEL operation to filter nodes by a given author
Expand All @@ -32,7 +32,7 @@ class FilterByAuthorOperation extends AbstractOperation
/**
* {@inheritdoc}
*
* We can only handle TYPO3CR Nodes.
* We can only handle NeosCR Nodes.
*
* @param mixed $context
* @return boolean
Expand All @@ -52,14 +52,14 @@ public function canEvaluate($context)
public function evaluate(FlowQuery $flowQuery, array $arguments)
{
if (!isset($arguments[0]) || empty($arguments[0])) {
throw new \TYPO3\Eel\FlowQuery\FlowQueryException('findByAuthor() needs a author to filter for', 1460741060);
throw new \Neos\Eel\FlowQuery\FlowQueryException('findByAuthor() needs a author to filter for', 1460741060);
} else {

/** @var NodeInterface $author */
$author = $arguments[0];

if ($author->getNodeType()->getName() !== 'JohannesSteu.Neos.News:Author') {
throw new \TYPO3\Eel\FlowQuery\FlowQueryException('findByAuthor() only accepts as parameter Nodes of type JohannesSteu.Neos.News:Author but '.$author->getNodeType().' given', 1460741067);
throw new \Neos\Eel\FlowQuery\FlowQueryException('findByAuthor() only accepts as parameter Nodes of type JohannesSteu.Neos.News:Author but '.$author->getNodeType().' given', 1460741067);
}

$nodesWithAuthorSet = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* This script belongs to the Flow package "JohannesSteu.Neos.News". *
* */

use TYPO3\Eel\FlowQuery\Operations\AbstractOperation;
use TYPO3\Eel\FlowQuery\FlowQuery;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Annotations as Flow;
use Neos\ContentRepository\Domain\Model\NodeInterface;

/**
* EEL operation to filter nodes by a given date. This operation will return all
Expand All @@ -33,7 +33,7 @@ class FilterByDateintervallOperation extends AbstractOperation
/**
* {@inheritdoc}
*
* We can only handle TYPO3CR Nodes.
* We can only handle NeosCR Nodes.
*
* @param mixed $context
* @return boolean
Expand All @@ -53,10 +53,10 @@ public function canEvaluate($context)
public function evaluate(FlowQuery $flowQuery, array $arguments)
{
if (!isset($arguments[0]) || empty($arguments[0])) {
throw new \TYPO3\Eel\FlowQuery\FlowQueryException('findByDateintervall() needs a property to filter for', 1460741060);
throw new \Neos\Eel\FlowQuery\FlowQueryException('findByDateintervall() needs a property to filter for', 1460741060);
} else {
if (!isset($arguments[1]) || empty($arguments[1])) {
throw new \TYPO3\Eel\FlowQuery\FlowQueryException('findByDateintervall() needs a date to filter in format for', 1460741060);
throw new \Neos\Eel\FlowQuery\FlowQueryException('findByDateintervall() needs a date to filter in format for', 1460741060);
}

// todo pretty dirty & rough implementation right now, make this cleaner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* This script belongs to the Flow package "JohannesSteu.Neos.News". *
* */

use TYPO3\Eel\FlowQuery\Operations\AbstractOperation;
use TYPO3\Eel\FlowQuery\FlowQuery;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Annotations as Flow;
use Neos\ContentRepository\Domain\Model\NodeInterface;

/**
* EEL operation to check if a node has a category set
Expand All @@ -32,7 +32,7 @@ class HasCategoryOperation extends AbstractOperation
/**
* {@inheritdoc}
*
* We can only handle TYPO3CR Nodes.
* We can only handle NeosCR Nodes.
*
* @param mixed $context
* @return boolean
Expand All @@ -52,7 +52,7 @@ public function canEvaluate($context)
public function evaluate(FlowQuery $flowQuery, array $arguments)
{
if (!isset($arguments[0]) || empty($arguments[0])) {
throw new \TYPO3\Eel\FlowQuery\FlowQueryException('hasCategory() needs a category to filter for', 1332492263);
throw new \Neos\Eel\FlowQuery\FlowQueryException('hasCategory() needs a category to filter for', 1332492263);
} else {
$nodesWithCategorySet = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* This script belongs to the Flow package "JohannesSteu.Neos.News". *
* */

use TYPO3\Eel\FlowQuery\Operations\AbstractOperation;
use TYPO3\Eel\FlowQuery\FlowQuery;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Annotations as Flow;
use Neos\ContentRepository\Domain\Model\NodeInterface;

/**
* EEL operation to remove important news
Expand All @@ -32,7 +32,7 @@ class RemoveImportantNewsOperation extends AbstractOperation
/**
* {@inheritdoc}
*
* We can only handle TYPO3CR Nodes.
* We can only handle NeosCR Nodes.
*
* @param mixed $context
* @return boolean
Expand All @@ -52,7 +52,7 @@ public function canEvaluate($context)
public function evaluate(FlowQuery $flowQuery, array $arguments)
{
if (!is_array($arguments)) {
throw new \TYPO3\Eel\FlowQuery\FlowQueryException('removeImportantNews() needs a true/false argument', 1332492263);
throw new \Neos\Eel\FlowQuery\FlowQueryException('removeImportantNews() needs a true/false argument', 1332492263);
} else {
if (!$arguments[0]) {
$nodes = $flowQuery->getContext();
Expand Down
6 changes: 3 additions & 3 deletions Configuration/NodeTypes.Content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
label: 'i18n'
reloadIfChanged: TRUE
inspector:
editor: 'TYPO3.Neos/Inspector/Editors/SelectBoxEditor'
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
values:
'publishDate':
Expand All @@ -41,7 +41,7 @@
inspector:
position: 10
group: 'mode'
editor: 'TYPO3.Neos/Inspector/Editors/SelectBoxEditor'
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
values:
'getAll':
Expand Down Expand Up @@ -102,7 +102,7 @@

'JohannesSteu.Neos.News:NewsFilter':
superTypes:
'TYPO3.Neos:Content': TRUE
'Neos.Neos:Content': TRUE
ui:
label: 'i18n'
icon: icon-filter
Expand Down
24 changes: 12 additions & 12 deletions Configuration/NodeTypes.Documents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
'JohannesSteu.Neos.News:AbstractNews':
abstract: TRUE
superTypes:
'TYPO3.Neos:Document': TRUE
'Neos.Neos:Document': TRUE
constraints:
nodeTypes:
'*': false
childNodes:
content:
type: 'TYPO3.Neos:ContentCollection'
type: 'Neos.Neos:ContentCollection'
ui:
label: 'i18n'
icon: 'icon-edit'
Expand All @@ -34,7 +34,7 @@
editorOptions:
format: 'd-m-Y H:i'
validation:
'TYPO3.Neos/Validation/DateTimeValidator': []
'Neos.Neos/Validation/DateTimeValidator': []
archiveDate:
type: DateTime
ui:
Expand All @@ -45,7 +45,7 @@
editorOptions:
format: 'd-m-Y H:i'
validation:
'TYPO3.Neos/Validation/DateTimeValidator': []
'Neos.Neos/Validation/DateTimeValidator': []
title:
type: string
ui:
Expand Down Expand Up @@ -142,7 +142,7 @@

'JohannesSteu.Neos.News:Category':
superTypes:
'TYPO3.Neos:Document': TRUE
'Neos.Neos:Document': TRUE
constraints:
nodeTypes:
'JohannesSteu.Neos.News:Category': TRUE
Expand All @@ -153,14 +153,14 @@
group: 'news'
childNodes:
main:
type: 'TYPO3.Neos:ContentCollection'
type: 'Neos.Neos:ContentCollection'

'JohannesSteu.Neos.News:Author':
childNodes:
about:
type: 'TYPO3.Neos:ContentCollection'
type: 'Neos.Neos:ContentCollection'
superTypes:
'TYPO3.Neos:Document': TRUE
'Neos.Neos:Document': TRUE
ui:
label: 'i18n'
icon: 'icon-user'
Expand All @@ -175,7 +175,7 @@
position: 30
childNodes:
main:
type: 'TYPO3.Neos:ContentCollection'
type: 'Neos.Neos:ContentCollection'
properties:
firstname:
type: string
Expand All @@ -192,7 +192,7 @@
inspector:
group: author
avatar:
type: TYPO3\Media\Domain\Model\ImageInterface
type: Neos\Media\Domain\Model\ImageInterface
ui:
label: 'i18n'
reloadIfChanged: TRUE
Expand Down Expand Up @@ -243,7 +243,7 @@

'JohannesSteu.Neos.News:Storage':
superTypes:
'TYPO3.Neos:Document': TRUE
'Neos.Neos:Document': TRUE
constraints:
nodeTypes:
'*': false
Expand All @@ -254,4 +254,4 @@
group: 'news'
childNodes:
main:
type: 'TYPO3.Neos:ContentCollection'
type: 'Neos.Neos:ContentCollection'
6 changes: 3 additions & 3 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
TYPO3:
Neos:
Neos:
typoScript:
fusion:
autoInclude:
'JohannesSteu.Neos.News': TRUE
'JohannesSteu.Neos.News': true
nodeTypes:
groups:
news:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Backticks make for `inline code` and code blocks can be in various languages lik

.. code-block:: yaml

TYPO3:
Neos:
Neos:
Seo:
twitterCard:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

prototype(JohannesSteu.Neos.News:AuthorInformations) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/TypoScriptObjects/Author.html'
prototype(JohannesSteu.Neos.News:AuthorInformations) < prototype(Neos.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/FusionObjects/Author.html'
sectionName = 'author'

firstname = ${q(node).property('firstname')}
Expand All @@ -18,13 +18,13 @@ prototype(JohannesSteu.Neos.News:AuthorInformations) < prototype(TYPO3.Neos:Cont
# News by this author
news = JohannesSteu.Neos.News:AuthorNewsList

about = TYPO3.Neos:ContentCollection{
about = Neos.Neos:ContentCollection{
nodePath = 'about'
}
}

# extend primary content
prototype(TYPO3.Neos:PrimaryContent) {
prototype(Neos.Neos:PrimaryContent) {
author {
@position = 'before default'
condition = ${q(node).is('[instanceof JohannesSteu.Neos.News:Author]')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
prototype(JohannesSteu.Neos.News:AuthorNewsList) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/TypoScriptObjects/AuthorNewsList.html'
prototype(JohannesSteu.Neos.News:AuthorNewsList) < prototype(Neos.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/FusionObjects/AuthorNewsList.html'

# Override node with your author node
@context.author = ${node}
Expand All @@ -19,8 +19,8 @@ prototype(JohannesSteu.Neos.News:AuthorNewsList) < prototype(TYPO3.Neos:Content)
[email protected] = ${value && q(value).count() > 0 ? q(value).slice(String.toInteger(offset), String.toInteger(limit)).get() : value}
}

prototype(JohannesSteu.Neos.News:AuthorNewsListItem) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/TypoScriptObjects/AuthorNewsListItem.html'
prototype(JohannesSteu.Neos.News:AuthorNewsListItem) < prototype(Neos.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/FusionObjects/AuthorNewsListItem.html'

publishDate = ${q(node).property('publishDate')}
title = ${q(node).property('title')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

prototype(JohannesSteu.Neos.News:NewsDetail) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/TypoScriptObjects/News.html'
prototype(JohannesSteu.Neos.News:NewsDetail) < prototype(Neos.Neos:Content) {
templatePath = 'resource://JohannesSteu.Neos.News/Private/Templates/FusionObjects/News.html'
sectionName = 'news'

// General properties
Expand All @@ -21,13 +21,13 @@ prototype(JohannesSteu.Neos.News:NewsDetail) < prototype(TYPO3.Neos:Content) {
authorname = ${q(this.author).property('firstname') + " " + q(this.author).property('lastname')}
[email protected] = ${q(node).property('author') != null}

content = TYPO3.Neos:ContentCollection{
content = Neos.Neos:ContentCollection{
nodePath = 'content'
}
}

# extend primary content
prototype(TYPO3.Neos:PrimaryContent) {
prototype(Neos.Neos:PrimaryContent) {
news {
@position = 'before default'
condition = ${q(node).is('[instanceof JohannesSteu.Neos.News:News]')}
Expand Down
Loading