Base.php in DRD Agent 4.0.x
File
src/Agent/Remote/Base.php
View source
<?php
namespace Drupal\drd_agent\Agent\Remote;
use Drupal\Component\Datetime\Time;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Database\Connection;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Session\AccountSwitcherInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class Base implements BaseInterface, ContainerInjectionInterface {
protected $container;
protected $accountSwitcher;
protected $configFactory;
protected $database;
protected $entityTypeManager;
protected $moduleHandler;
protected $time;
public function __construct(ContainerInterface $container, AccountSwitcherInterface $accountSwitcher, ConfigFactoryInterface $configFactory, Connection $database, EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, Time $time) {
$this->container = $container;
$this->accountSwitcher = $accountSwitcher;
$this->configFactory = $configFactory;
$this->database = $database;
$this->entityTypeManager = $entityTypeManager;
$this->moduleHandler = $moduleHandler;
$this->time = $time;
}
public static function create(ContainerInterface $container) {
return new static($container, $container
->get('account_switcher'), $container
->get('config.factory'), $container
->get('database'), $container
->get('entity_type.manager'), $container
->get('module_handler'), $container
->get('datetime.time'));
}
}
Classes
Name |
Description |
Base |
Base class for Remote DRD Remote Methods. |