$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');
| import java.util.HashMap; // import the HashMap class | |
| class Main { | |
| public static void main(String[] args) { | |
| String[] names = {"chris", "hello"}; | |
| HashMap<String, Integer> weatherStations = new HashMap<String, Integer>(); |
| version: "3.7" | |
| services: | |
| drupal: | |
| depends_on: | |
| - db | |
| build: ./app | |
| restart: unless-stopped | |
| volumes: | |
| - code:/app # mount the mutagen volume | |
| environment: |
| FROM php:7.4-apache | |
| # persistent dependencies | |
| RUN set -eux; \ | |
| apt-get update; \ | |
| apt-get install -y --no-install-recommends \ | |
| # Ghostscript is required for rendering PDF previews | |
| ghostscript \ | |
| ; \ | |
| rm -rf /var/lib/apt/lists/* |
| tooling: | |
| xdebug-on: | |
| service: appserver | |
| description: Enable xdebug for apache. | |
| cmd: "docker-php-ext-enable xdebug && /etc/init.d/apache2 reload" | |
| user: root | |
| xdebug-off: | |
| service: appserver | |
| description: Disable xdebug for apache. | |
| cmd: "rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && /etc/init.d/apache2 reload" |
| docker-compose build # rebuilds packages | |
| docker run -i --rm --network set08103-assessment_default set08103-assessment_app # runs just the app in an interactive shell using the default network | |
| docker ps # lists the docker processes | |
| docker exec -it <process id> bash # opens the shell of the docker container. useful for the database |