コード例 #1
0
 /**
  * Handle the command.
  *
  * @param FormFactory $factory
  * @return FormCriteria
  */
 public function handle(FormFactory $factory)
 {
     if (is_string($this->parameters)) {
         $this->parameters = ['builder' => $this->parameters];
     }
     return $factory->make($this->parameters);
 }
コード例 #2
0
 /**
  * Handle the command.
  *
  * @param  FormFactory  $factory
  * @return FormCriteria
  */
 public function handle(FormFactory $factory)
 {
     if (is_string($this->parameters)) {
         $this->parameters = ['builder' => $this->parameters];
     }
     if ($this->parameters instanceof Presenter) {
         $this->parameters = $this->parameters->getObject();
     }
     if ($this->parameters instanceof EntryInterface) {
         $this->parameters = ['entry' => $this->parameters->getId(), 'stream' => $this->parameters->getStreamSlug(), 'namespace' => $this->parameters->getStreamNamespace()];
     }
     return $factory->make($this->parameters);
 }