$ drush generate
Drush generate 10.3.6
Run drush generate [command]
and answer a few questions in order to write starter code to your project.
Available commands: [...]
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for XDebug", | |
"type": "php", | |
"request": "launch", | |
"hostname": "0.0.0.0", | |
"port": 9000, | |
"pathMappings": { |
// Sets the target and loads the current languages in your Drupal installation.
$code = 'pt';
$current_langcodes = \Drupal::languageManager()->getLanguages();
$current_langcodesList = array_keys($current_langcodes);
// Only creates the referred language if not exists.
if (!in_array($code, $current_langcodesList)){
$language = ConfigurableLanguage::createFromLangcode($code);
$language->save();
sudo apt --qq update && | |
sudo apt -qq upgrade && | |
sudo apt -yqq install \ | |
php7.4 \ | |
php7.4-bcmath \ | |
php7.4-bz2 \ | |
php7.4-curl \ | |
php7.4-dev \ | |
php7.4-gd \ | |
php7.4-dom \ |
You will need a initial PHP setup in your OS. If you're in Debian / Ubuntu use the next gist in order to execute a basic script for installing the resources.
Gist: Installing a basic PHP setup in Debian / Ubuntu (7.4): https://gist.github.com/davidjguru/18e53e39a569a12ea79595ed7971b739.
:~$ cd workspace/
:~$ composer create-project drupal/recommended-project drupal_decoupled
:~$ cd drupal_decoupled/
:~$ composer require "drupal/jsonapi_extras" "drupal/paragraphs" "drupal/consumers" "drupal/simple_oauth" "drupal/subrequests"
$ mkdir example-drupal && cd example-drupal
$ ddev config --project-type=drupal9 --docroot=web --create-docroot
$ ddev composer create "drupal/recommended-project"
$ ddev composer require drush/drush drupal/admin_toolbar drupal/devel
$ ddev exec drush si --site-name=Example-Drupal --account-name=admin --account-pass=admin -y
$ ddev start && ddev launch
<?php | |
namespace Drupal\managing_activities\Plugin\Block; | |
use Drupal\Core\Block\BlockBase; | |
use Drupal\Core\Form\FormBuilderInterface; | |
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
/** |
helpfull links | |
(1) https://gist.github.com/cbednarski/5379830 | |
(2) http://www.clarifylinux.org/2012/04/ubuntu-1204-tweak-and-hack-round-up.html | |
(3) http://jeffhendricks.net/?p=68 | |
(4) BEST for 64 bit http://www.randomhacks.co.uk/how-to-install-balsamiq-mockups-on-ubuntu-13-10/ | |
The steps I did | |
RUN>> | |
locate libgnome-keyring.so /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/i386-linux-gnu/libgnome-keyring.so.0.2.0 |