Skip to content

Instantly share code, notes, and snippets.

<?php
public static function ajaxBundleCallback($form, FormStateInterface $form_state) {
return $form['settings']['bundle'];
}
mikey-p ~/git/example.org (master): drush --version
Drush Version : 7.0.0-alpha9
mikey-p ~/git/example.org (master): drush sa @dev
$aliases["dev"] = array (
'uri' => 'dev.example.org',
'root' => '/var/www/dev.example.org/htdocs',
'remote-host' => 'example.org',
'remote-user' => '316e',
'path-aliases' =>
array (
mikey-p ~/git/projectname/drupal (dev): drush --version
Drush Version : 7.0.0-alpha9
mikey-p ~/git/projectname/drupal (dev): drush sql-conf
Array
(
[driver] => mysql
[database] => projectname
[username] => root
[host] => localhost
mikey-p ~/git/example/drupal (dev): drush cc drush --debug
Starting Drush preflight. [0.01 sec, 451.49 KB] [preflight]
Cache MISS cid: 7.0-dev-commandfiles-0-95a56dc71d69d1c02a2a6e6dd9e7ee4b [0.01 sec, 474.91 KB] [debug]
Cache SET cid: 7.0-dev-commandfiles-0-95a56dc71d69d1c02a2a6e6dd9e7ee4b [0.03 sec, 501.31 KB] [debug]
Bootstrap to phase 0. [0.17 sec, 2.73 MB] [bootstrap]
Drush bootstrap phase : bootstrap_drupal_root() [0.17 sec, 2.74 MB] [bootstrap]
Initialized Drupal 7.34 root directory at /Users/mdp/git/example/drupal [0.18 sec, 2.76 MB] [notice]
Cache MISS cid: 7.0-dev-commandf
<?php
$queue = DrupalQueue::get('versioncontrol_reposync');
while ($item = $queue->claimItem()) {
try {
versioncontrol_reposync_run_worker($item->data);
$queue->deleteItem($item);
}
catch (Exception $e) {
@mikeyp
mikeyp / awyiss.coffee
Created April 17, 2015 20:08
Hubot plugin
# Description:
# aw yiss
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
include_once(/Users/MYCOWORKERSNAME/git/client-com/drupal/themes/custom/client/client.theme): failed to open stream: No such file or [warning]
directory in Drupal\Core\Extension\Extension-&gt;load() (line 145 of
core/lib/Drupal/Core/Extension/Extension.php).Drupal\Core\Extension\Extension->load()
Drupal\Core\Extension\Extension->load()
twig_init(Object)
call_user_func('twig_init', Object)
Drupal\Core\Theme\ThemeInitialization->loadActiveTheme(Object)
Drupal\Core\Theme\ThemeInitialization->initTheme('client')
Drupal\Core\Theme\ThemeManager->initTheme(NULL)
Drupal\Core\Theme\ThemeManager->getActiveTheme()
@mikeyp
mikeyp / gist:e517bf75611f69d702e3
Created June 10, 2015 20:31
project.make.yml
core: 8.x
api: 2
defaults:
projects:
subdir: contrib
location: "http://updates.drupal.org/release-history" # Workaround for missing SSL on updates.drupal.org
# Drupal Core
projects:
@mikeyp
mikeyp / html.html.twig
Created June 16, 2015 21:08
Oh Drupal!!
{% if head_title is iterable %}
<title>{{ head_title|safe_join(' | ') }}</title>
{% else %}
<title>{{ head_title }}</title>
{% endif %}
<?php
$map = \Drupal::entityManager()->getFieldMap();
dsm($map);