コード例 #1
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     parent::prepareExecute();
     if ($this->formControl) {
         $this->data = (array) $this->input->getArray($this->formControl);
     } else {
         $this->data = (array) $this->input->toArray();
     }
 }
コード例 #2
0
 /**
  * getModel
  *
  * @param string $name
  * @param mixed  $source
  * @param bool   $forceNew
  *
  * @return ModelRepository
  *
  * @throws \DomainException
  */
 public function getModel($name = null, $source = null, $forceNew = false)
 {
     // Force the singular model
     if ($name === null && !$this->model instanceof ModelRepository) {
         if (is_string($this->model)) {
             $name = $this->model;
         } else {
             $name = $name ?: $this->config['item_name'];
         }
     }
     return parent::getModel($name, $source, $forceNew);
 }