You are here

public static function EntityAccessByField::create in Open Social 10.2.x

Same name and namespace in other branches
  1. 10.3.x modules/custom/entity_access_by_field/src/Plugin/search_api/processor/EntityAccessByField.php \Drupal\entity_access_by_field\Plugin\search_api\processor\EntityAccessByField::create()
  2. 10.1.x modules/custom/entity_access_by_field/src/Plugin/search_api/processor/EntityAccessByField.php \Drupal\entity_access_by_field\Plugin\search_api\processor\EntityAccessByField::create()

File

modules/custom/entity_access_by_field/src/Plugin/search_api/processor/EntityAccessByField.php, line 46

Class

EntityAccessByField
Adds content access checks for nodes.

Namespace

Drupal\entity_access_by_field\Plugin\search_api\processor

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {

  /** @var static $processor */
  $processor = parent::create($container, $configuration, $plugin_id, $plugin_definition);
  $processor
    ->setLogger($container
    ->get('logger.channel.search_api'));
  $processor
    ->setDatabase($container
    ->get('database'));
  $processor
    ->setCurrentUser($container
    ->get('current_user'));
  return $processor;
}