Skip to content

Instantly share code, notes, and snippets.

@pumatertion
pumatertion / gist:6078214
Created July 25, 2013 09:29
menu startingPoint by eel
Exception while rendering
page<TYPO3.Neos:Page>/body<TYPO3.Neos:Template>/content/intro<TYPO3.Neos:ContentCollection>/default<TYPO3.TypoScript:Matcher>/element<TYPO3.Neos:ContentCollection.Default>/itemRenderer<TYPO3.Neos:ContentCase>/default<TYPO3.TypoScript:Matcher>/element<BLEICKER.Pipeu:ArticleTeaserList>:
Catchable Fatal Error: Argument 3 passed to TYPO3\Neos\TypoScript\MenuImplementation_Original::findParentNodeInBreadcrumbPathByLevel() must implement interface TYPO3\TYPO3CR\Domain\Model\NodeInterface, string given, called in /Users/pumatertion/Sites/neospipeu/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Neos_TypoScript_MenuImplementation.php on line 202 and defined in /Users/pumatertion/Sites/neospipeu/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Neos_TypoScript_MenuImplementation.php line 264 (20130725112800f29d2e)
prototype(BLEICKER.Pipeu:ArticleTeaserList) < prototype(TYPO3.Neos.NodeTypes:Menu)
prototype(BLEICKER.Pipeu:ArticleTeaserList) {
startingPoint = ${q(site).children('de').children('artikel')}
}
prototype(BLEICKER.Commerce:ArticleStartingPoint.De) < prototype(TYPO3.TypoScript:Value) {
value = ${q(site).children('de').children('artikel').get(0)}
}
prototype(BLEICKER.Commerce:ArticleStartingPoint.En) < prototype(TYPO3.TypoScript:Value) {
value = ${q(site).children('en').children('articles').get(0)}
}
prototype(BLEICKER.Pipeu:ArticleTeaserList) < prototype(TYPO3.Neos.NodeTypes:Menu)
isnt it better to order the arguments of addFlashMessage like message itself accepts them.
\TYPO3\Flow\Error\Notice($messageBody, $messageCode, $messageArguments, $messageTitle)
in most cases i just need $messageBody and $messageCode. severity can be dafault. but i have to put the argument for severity just to be able to add a $messageCode.
$this->addFlashMessage('Done',123423423);
this is coded faster if you want to translate messages by id in rendering instead of:
$this->addFlashMessage('Done', '', Message::SEVERITY_OK, array(), 123423423)
also a use statement is needed for this if you dont want to use fqn.
@pumatertion
pumatertion / BitMaskPermission.php
Created August 16, 2013 21:17
Bitmask Example Read/Write/Execute/Delete
<?php
/* *
* This script belongs to the TYPO3 Flow framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *
* */
@pumatertion
pumatertion / RecursiveArrayIteration.php
Created September 10, 2013 09:49
Usage of Recursive Iterators
<?php
$array = array(
'foo' => array(
'bar' => array(
'baz' => 'bar'
)
)
);
@pumatertion
pumatertion / debug.php
Created December 29, 2013 08:53
TYPO3 Flow Repository - Debug the current query statement
$query = $this->createQuery();
/**
* @var \Doctrine\ORM\QueryBuilder $queryBuilder
*/
$queryBuilder = \TYPO3\Flow\Reflection\ObjectAccess::getProperty($query, 'queryBuilder', TRUE);
\TYPO3\Flow\var_dump($queryBuilder->getQuery()->getSQL(), __CLASS__ . '#' . __LINE__, FALSE, FALSE);
@pumatertion
pumatertion / gist:8238738
Last active January 2, 2016 02:39
creating background process for beanstalkd queues and log the jobs
nohup /Foo/Bar/flow job:work theQueueName >> /var/log/beanstalkd/theQueueName.log 2>&1 &
@pumatertion
pumatertion / FooRepository.php
Last active January 2, 2016 16:59
Accessing QueryBuilder and add additional where statement f.e.
class FooRepository extends Repository {
/**
* @return QueryResultInterface
*/
public function findAllWhereSenderEqualsRecipient() {
$query = $this->createQuery();
/**
<?php
namespace Some\Package\Domain\Model;
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;
use TYPO3\Flow\Security\Policy\Role;
use TYPO3\Party\Domain\Model\AbstractParty;
/**
* A User