Skip to content

Instantly share code, notes, and snippets.

View EclipseGc's full-sized avatar

Kris Vanderwater EclipseGc

View GitHub Profile
@EclipseGc
EclipseGc / Drupal\routing_hijack\EventListener\RouterListener\RouterListener.php
Created August 18, 2013 22:02
An event listener that hijacks all routes that don't begin with admin, contextual or toolbar.
<?php
/**
* @file
* Contains Drupal\routing_hijack\EventListener\RouterListener.
*/
namespace Drupal\routing_hijack\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\KernelEvents;
@EclipseGc
EclipseGc / index.php
Created August 18, 2013 21:01
An example Symfony style index.
<?php
$container = require_once __DIR__ . '/../src/container.php';
use Symfony\Component\HttpFoundation\Request;
$request = Request::createFromGlobals();
$response = $container->get('kernel.cache')->handle($request)->send();
@EclipseGc
EclipseGc / Some\Namespace\EventListener\MyPluginListener.php
Created August 17, 2013 03:40
An alternative plugin dependency injection technique that leverages the Event dispatcher.
<?php
namespace Some\Namespace\EventListener;
use Some\Namespace\MyPluginBase;
use Some\Namespace\Event\MyPluginTypeInjectionEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class MyPluginListener implements EventSubscriberInterface {
<?php
/**
* @file
* Contains SiteManager\Core\PluginRouterListener.
*/
namespace SiteManager\Core;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
{ "rules_commerce_order_message_order_notification" : {
"LABEL" : "Commerce order message: order notification e-mail",
"PLUGIN" : "reaction rule",
"WEIGHT" : "3",
"REQUIRES" : [ "rules", "message_notify", "commerce_checkout" ],
"ON" : [ "commerce_checkout_complete" ],
"DO" : [
{ "entity_create" : {
"USING" : {
"type" : "message",
{
"name" : "commerce_order_order_confirmation",
"description" : "Commerce Order: order confirmation",
"argument_keys" : [],
"argument" : [],
"category" : "message_type",
"data" : { "purge" : { "override" : 0, "enabled" : 0, "quota" : "", "days" : "" } },
"language" : "",
"arguments" : null,
"message_text" : { "und" : [
diff --git a/css/rocketship.main.css b/css/rocketship.main.css
new file mode 100644
index 0000000..fff986f
--- /dev/null
+++ b/css/rocketship.main.css
@@ -0,0 +1,12 @@
+.node-rocketship-issue .field-type-taxonomy-term-reference {
+ display: inline-block;
+ margin: 0;
+}
diff --git a/rocketbooster.pages_default.inc b/rocketbooster.pages_default.inc
index 7d03d83..80c4c3b 100644
--- a/rocketbooster.pages_default.inc
+++ b/rocketbooster.pages_default.inc
@@ -10,395 +10,415 @@
*/
function rocketbooster_default_page_manager_pages() {
$pages = array();
- $master_term = variable_get('rocketship_master_tag', 'D8MI');
- $term_array = taxonomy_get_term_by_name($master_term, 'rocketship_issue_tags');
<?php
$container->setDefinition('namespaces', new Definition())
->setSynthetic(TRUE);
$container->set('namespaces', $loader->getPrefixes());
<?php
/**
* @file
* Contains SiteManager\Core\Route\CreateSite.
*/
namespace SiteManager\Core\Route;
use Drupal\Core\Database\Database;
use SiteManager\Core\Annotation\Route;