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 , 12 July, 2016

Features

Tags

  • Drupal 8
  • Drupal 7
  • Features
  • Module
  • Drush

Features is a drupal contrib module enables the capture and management of features in Drupal, by providing a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module.

By editor , 12 July, 2016

Features

Tags

  • Drupal 8
  • Drupal 7
  • Features
  • Module
  • Drush

Features is a drupal contrib module enables the capture and management of features in Drupal, by providing a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module.

By editor , 8 July, 2016

Create a simple module to use Drupal 8 Hook System

Tags

  • Drupal 8
  • Code
  • Module
  • Hook

Drupal 8 Hook System

Hooks allow modules to alter the drupal core behavior or another module. Hooks are discovered and called at specific times to alter or add to the base behavior or data (invoking the hook). Each hook has a name start with hook_ (Ex; hook_menu()).

By editor , 7 July, 2016

Create a new Plugin type using Drupal 8 Plugin API

Tags

  • Drupal 8
  • Code
  • Plugin

Create a new Plugin Type in Drupal 8

Example from Drupal 8 example module, Thank you.
See the Drupal 8 'Example' contrib module for full details and source

Module name : 'plugin_type_example'

By editor , 7 July, 2016

Drupal 8 Services and dependency injection

Tags

  • Drupal 8
  • Code
  • Services

 

Drupal 8 introduces the concept of services to decouple reusable functionality and makes these services pluggable and replaceable by registering them with a service container.

By editor , 7 July, 2016

Drupal 8 Plugin API

Tags

  • Drupal 8
  • Code
  • Plugin

 

Plugins are small pieces of functionality that are swappable. Plugins that perform similar functionality are of the same plugin type.

Link : https://www.drupal.org/developing/api/8/plugins

By editor , 29 June, 2016

Use multiple / external databases in Drupal 8

Tags

  • Drupal 8
  • Code
  • Database

The database settings (and connection) has 3 levels.

1. KEY
2. TARGET
3. DATA

Example:

$databases[KEY][TARGET] = array (
 DATA
);

Like:

By editor , 14 June, 2016

SEO - URL Formatting

Tags

  • Drupal 8
  • SEO

Option 1.

Use the drupal 8 native URL Field option.

Option 2. Module PathAuto

- Configure the path settings and Path pattern 

-> NOTE : Do not change the path

By editor , 13 June, 2016

Read a Webpage, Image, File or any url using Drupal 8 httpClient

Tags

  • Drupal 8
  • Code

Use drupal 8 httpClient to read URL.

// Drupal httpClient.
$http = \Drupal::httpClient();
$url = 'http://example.com/';

Example:

$options = array();
$result = $http->request('get', $url, $options);

By editor , 13 June, 2016

Correct a broken HTML file or a HTML String

Tags

  • PHP
  • Code
  • Drupal 8
  • Utility

Example 1 : With DOMDocument: (Fast (0.0002 sec) but can have php warning)

Pagination

  • First page
  • Previous page
  • …
  • Page 11
  • Page 12
  • Page 13
  • Page 14
  • Page 15
  • Page 16
  • Page 17
  • Page 18
  • Page 19
  • …
  • 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