Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

RepositoryContext.php
Go to the documentation of this file.
1 <?php
2
7 namespace EzSystems\PlatformBehatBundle\Context;
8
9 use eZ\Publish\API\Repository\Repository;
10 use eZ\Publish\Core\Repository\Values\User\UserReference;
11
19 trait RepositoryContext
20 {
24 private $adminUserId = 14;
25
27 private $repository;
28
32 protected function setRepository(Repository $repository)
33 {
34 $this->repository = $repository;
35 }
36
40 public function getRepository()
41 {
42 return $this->repository;
43 }
44
48 public function loginAdmin($event)
49 {
50 $this->repository->setCurrentUser(new UserReference($this->adminUserId));
51 }
52 }
EzSystems\PlatformBehatBundle\Context\RepositoryContext
trait RepositoryContext
Repository Context Trait.
Definition: RepositoryContext.php:20
EzSystems\PlatformBehatBundle\Context\loginAdmin
loginAdmin($event)
@BeforeScenario
Definition: RepositoryContext.php:48
EzSystems\PlatformBehatBundle\Context\setRepository
setRepository(Repository $repository)
Definition: RepositoryContext.php:32
EzSystems\PlatformBehatBundle\Context\$repository
$repository
Definition: RepositoryContext.php:27
EzSystems\PlatformBehatBundle\Context\getRepository
getRepository()
Definition: RepositoryContext.php:40
eZ\Publish\Core\Repository\Values\User\UserReference
This class represents a user reference for use in sessions and Repository.
Definition: Core/Repository/Values/User/UserReference.php:17
eZ\Publish\API\Repository\Repository
Repository interface.
Definition: API/Repository/Repository.php:16
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.