This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hack the Contao2 Controller::classFileExists() | |
* | |
* (c) Tristan Lins <[email protected]> | |
* Christian Schiffler <[email protected]> | |
* | |
* @author Tristan Lins <[email protected]> | |
* @license MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\DemoBundle\Form\Type; | |
use Symfony\Component\HttpFoundation\File\UploadedFile; | |
/** | |
* Class FilesmData | |
*/ | |
class FilesmData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BASEDIR=$(pwd) | |
find -type d -name .git | while read GITDIR; do | |
DIR=$(dirname $GITDIR) | |
cd "$BASEDIR/$DIR" | |
STATUS=$(git status -s) | |
if [[ -n "$STATUS" ]]; then | |
echo '--- modifications --------------------------------------------------------------' | |
pwd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<code_scheme name="bit3"> | |
<option name="OTHER_INDENT_OPTIONS"> | |
<value> | |
<option name="INDENT_SIZE" value="4" /> | |
<option name="CONTINUATION_INDENT_SIZE" value="8" /> | |
<option name="TAB_SIZE" value="4" /> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
<option name="SMART_TABS" value="false" /> | |
<option name="LABEL_INDENT_SIZE" value="0" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Hooks | |
{ | |
public function outputFrontendTemplate($buffer) | |
{ | |
$buffer = preg_replace_callback( | |
'~class="([^"]+)"~', | |
function ($matches) { | |
$classes = explode(' ', $matches[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
# | |
# Avisota nightly build example configuration based on contao-community-alliance/build-system-repositories | |
# | |
##### | |
config: | |
storage: .../repositories | |
providers: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$GLOBALS['TL_DCA']['tl_content']['fields']['my_headline']['save_callback'][] = array('Hooks', 'saveMyHeadline'); | |
class Hooks | |
{ | |
public function saveMyHeadline($value, $dc) | |
{ | |
$headline = array('value' => $value, 'unit' => 'h2'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TAG=$1 | |
if [[ -z "$TAG" ]]; then | |
echo "No tag specified!" | |
exit 1 | |
fi | |
if [[ -n "$(git status --porcelain)" ]]; then | |
echo "Uncommited changes detected!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
@r AS _id, | |
( | |
SELECT | |
@r := pid | |
FROM | |
tl_page | |
WHERE | |
id = _id | |
) AS parent, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use NotificationCenter\Model\Notification; | |
class Hooks | |
{ | |
public function processFormData($post, $form, $files) | |
{ | |
$notificationIds = (array) unserialize($form['notifications']); |