Skip to content

Instantly share code, notes, and snippets.

View msonnabaum's full-sized avatar

Mark Sonnabaum msonnabaum

  • Lithic
  • San Diego, CA
View GitHub Profile
@msonnabaum
msonnabaum / test.php
Last active October 26, 2015 19:01 — forked from damiankloip/test.php
<?php
$application['kernel'] = $application->share(
$application->extend('kernel', function ($kernel, $app) {
return new YourNewHttpKernelInterfaceObject($kernel);
})
);
<?php
class ContentEntityFormController extends EntityFormController {
public function getFormLangcode(array &$form_state) {
if (empty($form_state['langcode'])) {
$form_state['langcode'] = $this->entityManager()->getTranslationFromContext($this->entity)->language()->id;
}
return $form_state['langcode'];
<?php
/**
* @file
* Provide Drush integration for release building and dependency building.
*/
/**
* Implements hook_drush_command().
*/
function registry_rebuild_drush_command() {