how create modules, controllers, plugin block drupal 8.54






i recomend use a docker-compose with drupal what have configuration ready to create modules

if you use native apache run install composer and install drupal console with


  • Download composer
    Terminal:
    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  • Install Composer
    Terminal:
    php composer-setup.php
  • Copy composer to local bin
    Terminal:
    cp -a composer.phar /usr/local/bin/composer
  • Install git
    Terminal:
    apt-get update -y && apt-get install git-core -y

  • Install console with composer
  • Terminal:
    composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
  • Install drush with composer
  • Terminal:
    composer global require drush/drush && \
        composer global update

or with docker easy run that install whole before
Terminal:
sudo docker-compose up




now run this

Use this command:

Terminal:
vendor/bin/drupal generate:module


For generate a controller:
Terminal:
vendor/bin/drupal generate:controller


for generate plugin block:
Terminal:
vendor/bin/drupal generate:plugin:block
Remenber write to name module






0 comentarios :

start drupal 8.54 or 7.59 with docker









import!! first check this post



configuration for drupal 8.54


Repository:


Repository:



start with 

Terminal:
sudo docker-compose up

stop with

CTRL+C or

Terminal:
sudo docker-compose stop












0 comentarios :

how to resize multiple to image Ubuntu/Manjaro

Ubuntu
Terminal:
sudo apt-get install imagemagick

Manjaro
Terminal:
sudo pacaman -S imagemagick

Note: that commands are in your folder

resize mode default
Terminal:
convert *.jpg -resize 500x500 -quality 100 foto.jpg

resize mode force
Terminal:
convert *.jpg -resize 500x500! -quality 100 foto.jpg


Reducing the file size of a very large images, without changing the image dimensions
first create a folder tmp same level to dictory
Terminal:
mkdir ../tmp

resize all elements jpg to directory
Terminal:
for i in *.jpg; do convert "$i" -quality 40  ../tmp/"$i"; done

up a directory and check to diff
Terminal:
du -smh * | sort -h


Fuente:
https://www.imagemagick.org/discourse-server/viewtopic.php?t=21324



0 comentarios :