By editor, 12 November, 2016 Custom Content Entity Field types of drupal 8 Tags Drupal 8 Code Entity Database Entity Field types, Data types (BaseFieldDefinition::create types)
By editor, 4 November, 2016 Set Drupal System variables manually Tags Drupal 8 Drupal 7 Settings To set Drupal System variables you can use the $settings (on Drupal 8) and $conf (On Drupal 7) array of setting.php file.
By editor, 4 November, 2016 Set Drupal System variables manually Tags Drupal 8 Drupal 7 Settings To set Drupal System variables you can use the $settings (on Drupal 8) and $conf (On Drupal 7) array of setting.php file.
By editor, 30 October, 2016 Theme Negotiators - Switch theme dynamically Tags Drupal 8 Code Theming Create a custom module (here : example) For active themes by route you first have to define a service in your $module.services.yml file: On example.services.yml Add:
By editor, 25 October, 2016 Drupal 8 Cache API Tags Drupal 8 Code Cache Get the default cache bin $cache = \Drupal::cache(); To get a particular cache bin (here 'render'): $render_cache = \Drupal::cache('render');
By editor, 19 October, 2016 Drupal 8 RESTful Web Services Tags Drupal 8 Code WebService Step 1: Activate RESTful Webservice Active modules: HAL (hal) RESTful Web Services (rest) HTTP Basic Authentication (basic_auth) Download and active contrib modules: REST UI (restui)
By editor, 13 October, 2016 Use Drupal 8 Service and Dependency Injection, Autowire Tags Drupal 8 Code Services You can call drupal 8 services statically as D7, but it is not the best practice (Like Here). Example : $uuid = \Drupal::service('uuid')->generate();
By editor, 13 October, 2016 Create a custom Service Tags Drupal 8 Code Services Create a Service on Drupal 8 1. Create a custom module (here : mytest) 2. Create the service Class Example: src/MTService.php
By editor, 11 October, 2016 Drupal 8 Service Tags Drupal 8 Code Services Get All available services list $services = \Drupal::getContainer()->getServiceIds(); Few use full services //Generate a new UUID $uuid = \Drupal::service('uuid')->generate();
By editor, 11 October, 2016 Custom Views Data handler for a custom Entity on drupal 8 Tags Drupal 8 Code Entity Views Once created your entity as Basic Entity or Full Entity, you can add a custom views handler.