This file contains hidden or 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 | |
function mymodule_myform($form, $form_state) { | |
$form = [ | |
'#method' => 'GET', | |
'#action' => url('my_search_page'), | |
'#token' => FALSE, | |
'#after_build' => [ | |
function($form) { | |
$form['form_token']['#access'] = FALSE; |
This file contains hidden or 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 | |
/** | |
* @file | |
* Contains \Drupal\faf_videos\Controller. | |
*/ | |
namespace Drupal\faf_videos; | |
use Drupal\Core\Cache\Cache; |
This file contains hidden or 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 | |
# Get the script's directory. | |
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P ) | |
# Go to the document root. | |
cd $DIR | |
cd ../www | |
# Ensure Drupal is already installed. |
This file contains hidden or 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
[XDebug] | |
zend_extension = xdebug.so | |
xdebug.remote_enable=1 | |
xdebug.remote_autostart=1 | |
xdebug.remote_host=127.0.0.1 | |
xdebug.remote_port="9000" | |
xdebug.idekey="PHPSTORM" | |
xdebug.max_nesting_level=9999 |
This file contains hidden or 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 | |
/** | |
* Implements hook_modules_enabled(). | |
* | |
* Install translations for all modules. | |
*/ | |
function myprofile_modules_enabled($modules) { | |
$langs = language_list(); | |
// For each enabled module. |
This file contains hidden or 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 | |
/** | |
* Implements hook_form_alter(). | |
* | |
* Allow all field_* form fields title and description to be translated. | |
*/ | |
function MYMODULE_form_alter(&$form, $form_state) { | |
foreach (element_children($form) as $key) { | |
if (strpos($key, 'field_') === 0) { |
This file contains hidden or 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
cd core; for dep in `composer info -iN`; do composer update $dep; git add -A .; git diff -M --cached > update-dep--${dep//\//--}.patch; git reset HEAD .; git checkout .; git clean -fd .; done; find . -size 0 -name "update-dep--*.patch" -exec rm -r {} \; |
This file contains hidden or 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 | |
RAND=$(cat /dev/urandom | tr -cd 'a-f0-9' | head -c 32) | |
SQLITE="/mnt/ramdisk/d8test.sqlite.$RAND" | |
DBURL="sqlite://localhost//mnt/ramdisk/d8test.sqlite.BASE" | |
URL="http://d8test.sqlite" | |
CONC=6 | |
if [ $1 ]; then | |
if [ $1 == "group" ] & [ $2 ]; then |