Skip to content

Instantly share code, notes, and snippets.

View mneuhaus's full-sized avatar

Marc Neuhaus mneuhaus

View GitHub Profile
@mneuhaus
mneuhaus / foo.php
Created August 28, 2015 07:56
function to remove process variants of an fal image
<?php
public function clearProcessedImages($fileUid) {
$processedFiles = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_file_processedfile', 'original = ' . $fileUid, 'identifier');
foreach ($processedFiles as $processedFile) {
$storage = $this->storageRepository->findByUid($processedFile['storage']);
$configuration = $storage->getConfiguration();
$path = realpath($configuration['basePath'] . $processedFile['identifier']);
unlink($path);
@mneuhaus
mneuhaus / codestyling-localization.php
Created January 31, 2014 11:29
Codestyling Localization
<?php
/*
Plugin Name: CodeStyling Localization
Plugin URI: http://www.code-styling.de/english/development/wordpress-plugin-codestyling-localization-en
Description: You can manage and edit all gettext translation files (*.po/*.mo) directly out of your WordPress Admin Center without any need of an external editor. It automatically detects the gettext ready components like <b>WordPress</b> itself or any <b>Plugin</b> / <b>Theme</b> supporting gettext, is able to scan the related source files and can assists you using <b>Google Translate API</b> or <b>Microsoft Translator API</b> during translation.This plugin supports <b>WordPress MU</b> and allows explicit <b>WPMU Plugin</b> translation too. It newly introduces ignore-case and regular expression search during translation. <b>BuddyPress</b> and <b>bbPress</b> as part of BuddyPress can be translated too. Produces transalation files are 100% compatible to <b>PoEdit</b>.
Version: 1.99.30
Author: Heiko Rabe
Author URI: http://www.code-styling.de/english/
Text Domain
@mneuhaus
mneuhaus / gerrit.json
Created February 17, 2014 16:00
Neos l10n changesets
{
"TYPO3.Neos": {
"[TASK] Adjust to dimension support in TYPO3CR": "27489",
"[WIP][FEATURE] Support l10n for nodes": "27490",
"[FEATURE] Add LanguageMenuImplementation": "27382",
"[WIP][TASK] Adjustment for first level cache": "27398",
"[TASK] Reload the nodeTree if the content dimensions change": "27383"
},
"TYPO3.TYPO3CR": {
"[FEATURE] Flexible content dimensions (and localization)": "27483",
<f:security.ifAuthenticated>
<f:then>
<a>Log out...</a>
</f:then>
<f:else>
<form>
login kopiert aus der Login extension
</form>
</f:else>
</f:security.ifAuthenticated>
TYPO3:
Flow:
persistence:
doctrine:
filters:
soft-deleteable: 'Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter'
@fixtures
Scenario: Update existing live node variant in user workspace, publish to live
Given I have the following nodes:
| Identifier | Path | Node Type | Properties | Workspace | Locale |
| fd5ba6e1-4313-b145-1004-dad2f1173a35 | /sites/neosdemotypo3/mainpage | TYPO3.Neos.NodeTypes:Page | {"title": "Mainpage"} | live | mul_ZZ |
| fd5ba6e1-4313-b145-1004-dad2f1173a35 | /sites/neosdemotypo3/mainpage | TYPO3.Neos.NodeTypes:Page | {"title": "Hauptseite"} | live | de_DE |
| 88745891-222b-e9c9-6144-4b3a5d80d482 | /sites/neosdemotypo3/mainpage/subpage | TYPO3.Neos.NodeTypes:Page | {"title": "Subpage"} | live | mul_ZZ |
| 88745891-222b-e9c9-6144-4b3a5d80d482 | /sites/neosdemotypo3/mainpage/subpage | TYPO3.Neos.NodeTypes:Page | {"title": "Unterseite"} | live | de_DE |
And I get a node by path "/sites/neosdemotypo3/mainpage" with the followin
<?php
/**
* Sets the available packages
*
* @param array $allPackages An array of \TYPO3\Flow\Package\Package objects
* @param array $activePackages An array of \TYPO3\Flow\Package\Package objects
* @return void
*/
public function setPackages(array $allPackages, array $activePackages) {
<?php
namespace Famelo\Saas\Services;
use Famelo\Saas\Core\SaasMatcher;
use Famelo\Saas\Domain\Model\Transaction;
use TYPO3\Eel\Context;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Error\Message;
use TYPO3\Flow\Mvc\ActionRequest;
use TYPO3\Flow\Reflection\ObjectAccess;
@mneuhaus
mneuhaus / Foo.php
Last active August 29, 2015 14:02
Using DoctrineExtension Traits
<?php
/**
* A Report
*
* @Flow\Entity
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
*/
class Foo {
use TimestampableEntity;
use SoftDeleteableEntity;
@mneuhaus
mneuhaus / 1_Intro.md
Last active August 29, 2015 14:03
Keep it simple stupid :)

Status of Expose

Currently i'd say that Expose is feature-wise at above 90% complete. There is little to no documentation currently aside from a little demo package i did to test + maintain it. One reason i didn't yet write documentation or shouted out to other people that they should use expose is my feeling, that we took a wrong direction. The introduction of TYPO3.Form and TYPO3.TypoScript added a flexibilty to the whole thing that you can't really find in other "admins". But it adds a huge amount of complexity. After using it extensively for 2 Customer projects this complexity feels plain wrong. It seems the direction expose went, got it to probably 70-80% on a DRY scale, yet we dropped well below 30% on a KISS scale. The performance was an issue as well, which is improved through the TypoScript caching, yet that's one more thing that you need to configure and take care of :/.

Because of this i've h