[Drupal] VM + XDebug + Netbeans

Hey! Long time no see! Heehee. I am just dropping a note here about the basic steps of how to install XDebug for a specific setup. Here is my configuration: host: OS: Windows 7 64 bits IP: 192.168.0.3 IDE: Netbeans 8.2 guest: OS: Debian Jessie 64 bits in VirtualBox IP: 192.168.0.4 (bridged network in VirtualBox …

[Drupal] Create an event subscriber

Instructions I will be creating a dedicated module using Drupal Console for this event subscriber. But feel free to use your own if you already have one! (don’t forget to backup) Access the drupal root folder in command line. Generate a new module:

Generate the event subscriber. We will subscribe to the kernel.request event: …

[Drupal] Service dependency injection in a service type class

The code

Additional Information Declare the services your class will use in the .services.yml file of your module. Unlike plugin type class service dependency injection, there is no create method to define the needed services. The __construct signature needs to respect the declared arguments from the .services.yml file. Originally made and tested on …

[Drupal] Service dependency injection in a plugin type class

The code

Additional Information Unlike service type class service dependency injection, there may be no need to implement an interface to be able to load the needed services, such as extending from ControllerBase. So if you are extending from a class which already has the dependency injection implementation, you can just override the create …

PHP/HTML : Lecteurs vidéo Youtube et Blip XHTML

Vous avez le code source ici : Lien vers le code Il s’agit d’un script PHP qui permet de sélectionner le bon lecteur en fonction de la plateforme. Par exemple, sur Flash, le player Blip va être un <video> tandis que sur PC et autres, il s’agira d’un <object> contenant un lecteur Flash. Le code …

Un modèle d’organisation perso de mes scripts pour Fuu-Doh!

Bon, en fait, je ne sais pas si je suis le premier à coder ainsi. Mais comme j’aime vraiment le modèle que j’ai conçu pour organiser les scripts de Fuu-Doh! v2, je pense que je partagerai bientôt le concept aux développeurs PHP qui pourraient en être intéressés. C’est un modèle de conception qui est très …