Christopher Bloom
Frontend developer, lover of design systems, CSS architecture, and all things javascript.
Christopher Bloom, @illepic
Frontend Lead, Phase2 Technology
(Ask questions whenever, this is a discussion)
https://getcomposer.org/
https://www.drupalvm.com/
Warning: https://github.com/geerlingguy/drupal-vm/issues/981
cp default.drupal.composer.json drupal.composer.json
cp default.config.yml config.yml
vagrant up
http://docs.drupalvm.com/en/latest/
Workflow:
https://drupalconsole.com/
Workflow:
vagrant ssh
cd /var/www/drupalvm/drupal
console status
YAML. All configuration in Drupal 8 is stored in YAML. Whitespace matters, representations of arrays objects (see demo)
https://www.drupal.org/docs/8/configuration-management/managing-your-sites-configuration
Workflow:
https://www.drupal.org/docs/8/theming/twig
# sites/default/services.yml:
parameters:
twig.config:
debug: true # originally false
themename.theme:
node.html.twig:
/**
* Implements hook_preprocess_node().
*/
function charles_preprocess_node(array &$variables) {
$variables['charles_var'] = t('Hello class');
$variables['charles_array'] = ['charles1', 'charles2', 'charles3'];
}
<ul>
{% for charles in charles_array %}
<li>{{ charles }}</li>
{% endfor %}
</ul>
By Christopher Bloom
Frontend developer, lover of design systems, CSS architecture, and all things javascript.