Skip to content

Instantly share code, notes, and snippets.

View jobee's full-sized avatar

Joachim Beck jobee

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jobee on github.
  • I am joachimbeck (https://keybase.io/joachimbeck) on keybase.
  • I have a public key ASCd9JwGnmdUr69VRR_a8mq5pg9v5sty-QEuWZ6_lK3qawo

To claim this, I am signing this object:

@jobee
jobee / ConsiderParentsVisibilityOperation.php
Last active February 14, 2022 08:44
A FlowQuery operation which applies an extra filter to consider parent nodes visibility
<?php
namespace Your\Package\Eel\FlowQueryOperations;
use Neos\ContentRepository\Domain\Projection\Content\TraversableNodeInterface;
use Neos\ContentRepository\Exception\NodeException;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Eel\FlowQuery\FlowQueryException;
use Neos\Eel\FlowQuery\Operations\AbstractOperation;
use Neos\Flow\Annotations as Flow;
use Neos\ContentRepository\Domain\Model\NodeInterface;
@jobee
jobee / NodeDataCommandController.php
Created September 17, 2021 09:37
Neos CMS - Command controller example to cleanup inline-editable properties
<?php
namespace Your\Package\Command;
use Doctrine\ORM\EntityManagerInterface;
use Neos\ContentRepository\Domain\Model\NodeType;
use Neos\ContentRepository\Domain\Model\Workspace;
use Neos\ContentRepository\Domain\Service\NodeTypeManager;
use Neos\Flow\Cli\CommandController;
use Neos\Flow\Persistence\PersistenceManagerInterface;
use Neos\Flow\Annotations as Flow;
@jobee
jobee / InterceptReloadDocumentAspect.php
Last active September 17, 2021 09:44
Neos CMS - Intercept UI reloads while editing document node properties (which are set to reloadIfChanged:true) outside of the current document scope
<?php
namespace Your\Package\Aspect;
use Neos\ContentRepository\Domain\Model\NodeInterface;
use Neos\Eel\FlowQuery\FlowQuery;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\AOP\JoinPointInterface;
use Neos\Flow\Property\PropertyMapper;
use Neos\Flow\Session\SessionInterface;
@jobee
jobee / ExampleNodeCreationHandler.php
Last active January 15, 2019 08:39
Example node creation handler for Neos that converts the given Asset Identifier into an Asset Object
<?php
namespace UseYourOwn\Namespace\NodeCreationHandler;
use Neos\ContentRepository\Domain\Model\NodeInterface;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Property\PropertyMapper;
use Neos\Flow\ResourceManagement\ResourceManager;
use Neos\Media\Domain\Model\Asset;
use Neos\Media\Domain\Model\AssetInterface;
use Neos\Neos\Ui\NodeCreationHandler\NodeCreationHandlerInterface;
@jobee
jobee / HostDimensionPresetDetector.php
Last active March 27, 2018 06:56
Neos Dimension Resolver by Host
<?php
namespace TMS\HostDimensionResolver\Http\ContentDimensionDetection;
use Flowpack\Neos\DimensionResolver\Http\ContentDimensionDetection\ContentDimensionPresetDetectorInterface;
use Neos\Flow\Http;
/**
* Host based dimension preset detector
*/
final class HostDimensionPresetDetector implements ContentDimensionPresetDetectorInterface
@jobee
jobee / MarkdownViewHelper.php
Last active August 10, 2016 11:30
Creating your own Markdown parser for Fluid templates in Flow / Neos applications
<?php
namespace Vendor\Name\ViewHelpers\Format;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* ViewHelper rendering the given string through parsedown
* GitHub: https://github.com/erusev/parsedown
*/