-
Install Homebrew:
$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) $ brew install git $ brew update
$ brew install drush
'use strict'; | |
// Include Gulp | |
var gulp = require('gulp'), | |
// Include Plug-ins | |
changed = require('gulp-changed'), | |
globbing = require('gulp-css-globbing'), | |
imagemin = require('gulp-imagemin'), | |
jshint = require('gulp-jshint'), |
I hereby claim:
To claim this, I am signing this object:
global _filename | |
on run | |
tell application "Finder" | |
-- Get this script's parent directory | |
set _path to (container of (path to me)) as text | |
set _filename to _path & "todays-log.csv" | |
-- Convert the filename to "/path/to/file" format | |
set _filename to POSIX path of _filename | |
end tell |
$bundle_label = \Drupal::entityTypeManager() | |
->getStorage('node_type') | |
->load($node->bundle()) | |
->label(); |
// 2 digit code | |
$language = \Drupal::languageManager()->getCurrentLanguage()->getId(); | |
// Name | |
$language = \Drupal::languageManager()->getCurrentLanguage()->getName(); |
if ($entity->hasTranslation('en')) { | |
$translated_entity = $entity->getTranslation('en'); | |
$translated_title = $translated_entity->getTitle(); | |
} |
<pre>{{ dump() }}</pre> | |
{{ dump(_context|keys) }} | |
<ol> | |
{% for key, value in _context %} | |
<li>{{ key }}</li> | |
{% endfor %} | |
</ol> |
Twig provides a dump
function for debugging variables in templates.
The dump
function outputs information about a template variable. The dump
function will not display anything unless twig_debug
is enabled.
To enable Twig debugging, find the twig.config parameters in your services.yml and set debug to true:
parameters:
twig.config:
debug: true