コード例 #1
0
 /**
  * @param Entity|IIndexable $entity
  */
 public function indexEntity(Entity $entity)
 {
     $data = $entity->getIndexData();
     if ($data !== FALSE) {
         $this->es->addToIndex($entity->getShortEntityName(), (int) $entity->id, $data);
     }
 }
コード例 #2
0
 public function __construct(RepositoryContainer $container, EventManager $eventManager, Translator $translator)
 {
     parent::__construct();
     $this->orm = $container;
     $this->eventManager = $eventManager;
     $this->translator = $translator;
 }
コード例 #3
0
 public function __construct(ScalarExercise $exercise, $answer)
 {
     parent::__construct();
     $this->content = $exercise->getBlueprint();
     $this->seed = $exercise->getSeed();
     $this->answer = $answer;
 }
コード例 #4
0
 public function onAfterEntityStaticCache(Container $container)
 {
     Entity::$metaDataStorage = $container->getService('cacheStorage');
 }
コード例 #5
0
 public function __construct(Badge $badge, User $user)
 {
     parent::__construct();
     $this->badge = $badge;
     $this->user = $user;
 }
コード例 #6
0
 public function __construct()
 {
     parent::__construct();
     $this->events = [];
 }
コード例 #7
0
 public function __construct(Entity $entity)
 {
     $this->repoClass = get_class($entity->getRepository());
     $this->id = $entity->id;
 }
コード例 #8
0
 /**
  * @param string $email
  * @param string $type
  */
 public function __construct($email, $type)
 {
     parent::__construct();
     $this->email = $email;
     $this->emailType = $type;
 }
コード例 #9
0
 /**
  * @param User $teacher
  * @param User $student
  */
 public function __construct(User $teacher, $student)
 {
     parent::__construct();
     $this->sender = $teacher;
     $this->student = $student;
 }