예제 #1
0
 public function getValueOptions()
 {
     if ($this->initialized) {
         return parent::getValueOptions();
     }
     $this->initialized = true;
     $valueOptions = [];
     foreach ($this->clientRepository->findAllActive() as $client) {
         $valueOptions[$client->getId()] = $client->getName();
     }
     $this->setValueOptions($valueOptions);
     $this->insertSelectedClientIfRequired($this->value);
     return parent::getValueOptions();
 }
예제 #2
0
 public function indexAction()
 {
     return new ViewModel(['clients' => $this->clientRepository->findAllActive()]);
 }