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
use Guzzle\Cache\CacheAdapterInterface; | |
/** | |
* Custom cache adapter. | |
* | |
* Leverages the default Drupal cache bin system for caching Guzzle responses. | |
*/ | |
class DrupalCacheAdapter implements CacheAdapterInterface { | |
/** |
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
# Convert .scss to .css (including live reload). In some cases (e.g. when using | |
# Compass) the 'images' task has to run before this one so that utility | |
# functions like 'image-url' don't cause errors when evaluated before the image | |
# has been created. | |
gulp.task 'styles', ['images'], -> | |
sassConfig = | |
outputStyle: if isProduction then 'compressed' else 'expanded' | |
# Source maps are currently broken in 'gulp-sass'. | |
#sourceComments: 'map' |
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
// ---- | |
// Sass (v3.4.7) | |
// Compass (v1.0.1) | |
// Toolkit (v2.6.0) | |
// ---- | |
@import "toolkit"; | |
@mixin static($mixin-name, $extend: true) { | |
@if $extend == true { |
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
import React from 'react/addons'; | |
import isArray from 'lodash/lang/isArray'; | |
import isObject from 'lodash/lang/isObject'; | |
import isFunction from 'lodash/lang/isFunction'; | |
// @todo Remove this once React 0.14 lands (parent based contexts). | |
export default function renderChildren() { | |
const { children, ...props } = this.props; | |
if (isFunction(children)) { |
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$rendering-for-ie: true !default; | |
@mixin media($media-query, $render-for-ie: true) { | |
@if $rendering-for-ie == false { | |
@media (#{$media-query}) { | |
@content; |
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@function image-url($path) { | |
@return '../images/#{$path}'; | |
} | |
.foo { | |
background: url(image-url('asd.png')); |
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
# The routes of the project. | |
# | |
# Each route describes how an incoming URL is going | |
# to be processed by Platform.sh. | |
"http://{default}/": | |
type: upstream | |
upstream: "php:php" | |
"http://www.{default}/": |
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
node_page_edit: | |
pattern: '/music/{album}/{artist}' | |
defaults: | |
_content: 'Drupal\music\MusicController::view' | |
requirements: | |
_permission: 'yeap' | |
options: | |
parameters: | |
album: | |
converter: 'paramconverter.typed_data' |
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
foo_route: | |
pattern: '/some/random/{entity_type}/{entity}/route' | |
options: | |
parameters: | |
entity: | |
type: entity:{entity_type} |
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
+ public function convert($definition, $name, array $defaults, Request $request) { | |
+ // Only continue if there is a value for the given parameter. | |
+ if (!isset($defaults[$name])) { | |
+ return; | |
+ } | |
+ $entity_type = substr($definition['type'], strlen('entity:')); | |
+ if ($storage = $this->entityManager->getStorageController($entity_type)) { | |
+ return $storage->load($defaults[$name]); | |
+ } | |
+ } |
OlderNewer