$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');
#!/bin/bash | |
migrate_loop() | |
{ | |
# Better readability with separation. | |
echo "========================"; | |
# Get the output of the drush status. | |
drush_output=$(drush ms "$1" --format string); | |
# Split output string into an array. |
The individual files in this gist each have a unique trick to offer. They may be moved to official documentation or individual gists at a future date. | |
This file is mostly added because gists insist on titling the page with the alphabetically first file name, instead of the gist title. |
git config --global alias.checkoutr checkout
$EDITOR /usr/local/share/zsh/site-functions/git-completion.bash
...and then modify the file as follows...
-__gitcomp_nl "$(__git_refs '' $track)"
+if [ "$command" = "checkoutr" ]; then
+ __gitcomp_nl "$(__git_refs '' $track)"
+else