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