$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
| [ | |
| { | |
| "abbr": "AL", | |
| "name": "Alabama", | |
| "capital": "Montgomery", | |
| "lat": "32.361538", | |
| "long": "-86.279118" | |
| }, | |
| { | |
| "abbr": "AK", |
| --- | |
| # This has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: |
| " Don't try to be vi compatible | |
| set nocompatible | |
| " Helps force plugins to load correctly when it is turned back on below | |
| filetype off | |
| " TODO: Load plugins here (pathogen or vundle) | |
| " Turn on syntax highlighting | |
| syntax on |
| #!/bin/bash | |
| yum update -y | |
| yum -y install git.x86_64 | |
| cd /opt | |
| git clone -v https://github.com/ansible/ansible.git --recursive | |
| source /opt/ansible/hacking/env-setup | |
| echo "localhost" > ~/ansible_hosts | |
| export ANSIBLE_HOSTS=~/ansible_hosts |
| <?php | |
| /** | |
| * @Given /^I am viewing a product with the following related products:$/ | |
| */ | |
| public function assertRelatedProducts(TableNode $relatedProducts) { | |
| // First, create a product. | |
| $product = (object) array( | |
| 'title' => 'Parent Product', | |
| 'type' => 'product', | |
| 'uid' => 1, |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |