EntityViewDisplayAccessControlHandler example

->expects($this->any())
      ->method('id')
      ->willReturn(2);

    $this->entity = new EntityViewDisplay([
      'targetEntityType' => 'foobar',
      'bundle' => 'bazqux',
      'mode' => 'default',
      'id' => 'foobar.bazqux.default',
      'uuid' => '6f2f259a-f3c7-42ea-bdd5-111ad1f85ed1',
    ], 'entity_display');
    $this->accessControlHandler = new EntityViewDisplayAccessControlHandler($this->entity->getEntityType());
    $this->accessControlHandler->setModuleHandler($this->moduleHandler);
  }

}
Home | Imprint | This part of the site doesn't use cookies.