You are here

public function FarmEntryPoint::__construct in farmOS 2.x

EntryPoint constructor.

Parameters

\Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface $resource_type_repository: The resource type repository.

\Drupal\Core\Session\AccountInterface $user: The current user.

\Drupal\Core\Extension\ProfileExtensionList $profile_extension_list: The profile extension list service.

Overrides EntryPoint::__construct

File

modules/core/api/src/Controller/FarmEntryPoint.php, line 41

Class

FarmEntryPoint
Extend the core jsonapi EntryPoint controller.

Namespace

Drupal\farm_api\Controller

Code

public function __construct(ResourceTypeRepositoryInterface $resource_type_repository, AccountInterface $user, ProfileExtensionList $profile_extension_list) {
  parent::__construct($resource_type_repository, $user);
  $this->farmProfileInfo = $profile_extension_list
    ->getExtensionInfo('farm');
}