Skip to content

Instantly share code, notes, and snippets.

@fabarea
fabarea / composer.json
Created April 3, 2014 21:14
Composer typo3/cms-base-distribution
{
"name": "typo3/cms-base-distribution",
"description": "TYPO3 CMS base distribution",
"type": "project",
"minimum-stability": "dev",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
@fabarea
fabarea / remove_closing_tags.sh
Created February 11, 2014 15:05
Recursively remove the php closing tag `?>` and any following blank lines from the end of any PHP file. Source directories can be configured.
#!/bin/bash
###############################
# Recursively remove the closing php tag `?>` and any following blank lines from the
# end of any PHP file. Source directories can be configured.
#
# Author: Fabien Udriot <fabien.udriot@ecodev.ch>
# Date: 2014-02-11
###############################
if (!empty($GLOBALS['TCA'][$rowMmRefInfo['tablenames']]['ctrl']['languageField'])) {
$fields .= ',sys_language_uid';
}
$existingReferenceForeign = $this->damfalfileRepository->selectOneRowQuery($fields, $rowMmRefInfo['tablenames'], "uid = '" . $rowMmRefInfo['uid_foreign'] . "' and deleted != 1");
if (!empty($GLOBALS['TCA'][$rowMmRefInfo['tablenames']]['ctrl']['languageField'])) {
$existingReferenceForeign["sys_language_uid"] = 0;
}
@fabarea
fabarea / FeatureContext.php
Created July 18, 2013 11:42
Behat - step for browsing all pages of site map
<?php
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\MinkContext;