Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

Tutorials - Drupal

By editor , 3 January, 2017

Create a Drupal 9 Project using composer.

Tags

  • Drupal 8
  • Code
  • Composer

Using recommended-project template

 

composer create-project drupal/recommended-project my-project

For more information, see : https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates

 

By editor , 20 December, 2016

Drupal 8 Url Tips. Get Name, Path, Args ...

Tags

  • Drupal 8
  • Code

Drupal 8 Url Object
use Drupal\Core\Url;

Create a Url

Create Url from route name

$url = Url::fromRoute('<current>');
$url = Url::fromRoute('entity.node.canonical', ['node' => 1], []);

By editor , 16 December, 2016

Notify When SSH connection success

Tags

  • Drupal 8
  • Server
  • Linux

Method 1. Call Url


You can use this method to call a Custom php script, Custom module, Databaselog .... for example.

1. Create a script (here, notify_login_url.sh)

By editor , 13 December, 2016

Solr Configuration for Drupal

Tags

  • Drupal 8
  • Module
  • Drupal 7

Step 1. Install Tomcat And Solr Server (atlest 5.4.1)

Step 2. Install Solr Search API On your drupal

#Drush# drush en search_api_solr -y

Step 3. Copy solr core files

By editor , 13 December, 2016

Solr Configuration for Drupal

Tags

  • Drupal 8
  • Module
  • Drupal 7

Step 1. Install Tomcat And Solr Server (atlest 5.4.1)

Step 2. Install Solr Search API On your drupal

#Drush# drush en search_api_solr -y

Step 3. Copy solr core files

By editor , 8 December, 2016

Adding jQuery UI Widget to drupal 8

Tags

  • Drupal 8
  • Code
  • jQuery

Example :

Step 1 : Add libraries. Example: (With theme / or module : mytheme)

On : mytheme.libraries.yml file

By editor , 8 December, 2016

Create a configurable Block programmatically

Tags

  • Drupal 8
  • Code
By editor , 7 December, 2016

SimpleTest : Running PHPUnit tests from command line

Tags

  • Drupal 8
  • Code
  • Debug
  • Testing

Initialisation - Create link to the script (Optional).

ln -s core/scripts/run-tests.sh ~/bin

Run Test and open rest in web browser.

php core/scripts/run-tests.sh --browser --class "Drupal\YOUR_MODULE\Tests\JustTest"

By editor , 28 November, 2016

Add a Form in to a Basic Controller

Tags

  • Drupal 8
  • Code
  • Form
  • Drupal 9

NOTE: I don't know this is the best practice, anyway it's working !!!.

By editor , 22 November, 2016

Handle database schemas on Drupal 8

Tags

  • Drupal 8
  • Code
  • Database

Get Database Schema

$schema = \Drupal\Core\Database\Database::getConnection()->schema();

 

Pagination

  • First page
  • Previous page
  • …
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • Page 10
  • Page 11
  • Page 12
  • Page 13
  • …
  • Next page
  • Last page

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer