Skip to content

Instantly share code, notes, and snippets.

View fredysan's full-sized avatar

Fredy Sánchez Téllez fredysan

View GitHub Profile
@fredysan
fredysan / Controller.php
Created February 1, 2024 21:59 — forked from ozin7/Controller.php
Drupal 8: Dependency injection in Service, Controller, Plugin, Deriver.
<?php
/**
* Controller. Implements ContainerInjectionInterface
*/
namespace Drupal\gurei\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\gurei\Service\CompanyService;
use Symfony\Component\DependencyInjection\ContainerInterface;