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 , 22 January, 2018

FormattableMarkup : Add parameters, links to a text, table cell data.

Tags

  • Drupal 8
  • Code
  • Theming

Create a customizable text.

Example :
use Drupal\Component\Render\FormattableMarkup;
$text = new FormattableMarkup('My name is @name', ['@name' => "The name"]);

By editor , 19 January, 2018

Event dispatcher. Create event, Dispatch and Subscribe.

Tags

  • Drupal 8
  • Code
  • Module
  • Services
  • Hook

Drupal's event system allow to create triggers when an event has been happened like create a custom hook on drupal 7.

By editor , 19 January, 2018

Event Subscriber to replace hook_boot and hook_init

Tags

  • Drupal 8
  • Code
  • Services
  • Hook

Use Event Subscriber service.

The EventSubscriber allow to execute an action on boot as hook_boot or hook_init of drupal 7.

Example.

By editor , 29 November, 2017

Get table column names on Drupal 8

Tags

  • Drupal 8
  • Database
  • Module

To get database table columns names of a mysql database you can use "DESCRIBE my_table;" method.

By editor , 2 November, 2017

Drupal 8 Configuration : Get, Set, Override and Exclude

Tags

  • Drupal 8
  • Configuration
  • Drupal 9

Get, Set and Delete configuration value by drush

Get (drush config-get)

drush cget CONFIG_NAME CONFIG_KEY
Examples:
drush cget system.site
drush cget system.site page.front

Set (drush config-set)

By editor , 31 October, 2017

Configuration property error.

Tags

  • Drupal 8
  • Code
  • Plugin
  • Configuration

 

If you have an error like this, when you use a custom views filter plugin, the resent is now you need to have a config schema for all Views filter plugins.

The error :

By editor , 1 October, 2017

Composer - Problems and Errors

Tags

  • Drupal 8
  • Composer
  • Error

 

By editor , 27 September, 2017

Drupal Commerce - e-commerce with Drupal

Tags

  • Drupal 8
  • Module
  • Commerce

CAUTION : At this day (2017-10-12), Drupal commerce is very young. Therefor you can start the development of your e-commerce site but you may have bugs and security issues.

By editor , 18 September, 2017

Use IMCE on custom page

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • Module

Example 1 (for drupal 7)


Step 1. Add file brows

Create a simple js file in your module directory (called yourModuleName.js) and enter the following Javascript.

By editor , 18 September, 2017

Use IMCE on custom page

Tags

  • Drupal 8
  • Code
  • Drupal 7
  • Module

Example 1 (for drupal 7)


Step 1. Add file brows

Create a simple js file in your module directory (called yourModuleName.js) and enter the following Javascript.

Pagination

  • First page
  • Previous page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • …
  • 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