This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Enable virtualisation from BIOS setting | |
2. Install docker desktop | |
3. Disable WSL2 and share your drive or folder from docker setting | |
4. Enable Hyper-v from windows setting | |
5. copy all the files docker4drupal to your drupal folder(most probably outside your web) | |
6. comment mariadb syntax from docker-composer.yml | |
7. Install mariadb on your windows separately. | |
8. run docker-compose up -d | |
9. put your URL in hosts file | |
10. change the mysql host entry(host.docker.internal) in your settings.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nodes": [ | |
{ | |
"title": "Code", | |
"icon": "images/icons/code_64.png", | |
"top": 165, | |
"left": 372, | |
"compID": "code", | |
"code": "next(null, { message : \"How does it work?\" });", | |
"id": "step_125" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$collection = 'post'; | |
$uid = '482'; | |
$database = \Drupal::service('mongodb.database_factory')->get('default'); | |
$collection = $database->selectCollection($collection); | |
$selector = ['user_id.target_id' => (int) $uid]; | |
$deleteResult = $collection->deleteMany($selector); | |
kint($deleteResult->getDeletedCount()); | |
kint($deleteResult);exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Drupal\grievance\Entity\GrievanceEntity; | |
$grievance_id = "4"; | |
$grievance = GrievanceEntity::load($grievance_id); | |
$grievance_vid = \Drupal::entityManager()->getStorage('grievance')->revisionIds($grievance); | |
$latest_revision_id = array_pop((array_slice($grievance_vid, -1))); | |
$grievance_revision = \Drupal::entityTypeManager() | |
->getStorage('grievance') | |
->loadRevision($latest_revision_id); | |
$current_state = $grievance_revision->get('moderation_state')->getValue()['0']['value']; | |
kint($current_state);exit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
*The numbers are normally composed of three parts: | |
* - 1 or 2 digits for Drupal core compatibility (Drupal 8, 9, 10, etc.). This | |
* convention must be followed. | |
* - 1 digit for your module's major release version; for example, for 8.x-1.* | |
* use 1, for 8.x-2.* use 2, for Core 8.0.x use 0, and for Core 8.1.x use 1. | |
* This convention is optional but suggested for clarity. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Migration configuration for imported planets. | |
id: import_drupal_planets | |
label: Import planets Data from Nasa | |
migration_group: Drupal Import | |
dependencies: | |
enforced: | |
module: | |
- nasa_facts | |
destination: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Available `vagrant_box` values include: | |
# - beet/box (pre-provisioned, based on Ubuntu 16.04) | |
# - geerlingguy/drupal-vm (pre-provisioned, based on Ubuntu 16.04) | |
# - geerlingguy/centos7 | |
# - geerlingguy/centos6 | |
# - geerlingguy/debian9 | |
# - geerlingguy/debian8 | |
# - geerlingguy/ubuntu1804 | |
# - geerlingguy/ubuntu1604 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "project", | |
"repositories": { | |
"drupal": { | |
"type": "composer", | |
"url": "https://packages.drupal.org/8" | |
}, | |
"asset-packagist": { | |
"type": "composer", | |
"url": "https://asset-packagist.org" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ref:- https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04 | |
1. PHP packages install:- | |
a. php-gd | |
b. php-cli | |
c. php-curl | |
d. php-ldap | |
e. php-zip | |
f. php-mail | |
g. php-mail-mime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; cd into the directory you store code resources. | |
cd ~ | |
; Clone PHP_CodeSniffer directly from the github repo. | |
; You could also install via pear. | |
git clone [email protected]:squizlabs/PHP_CodeSniffer.git | |
; Clone the coder branch you want. |
NewerOlder