Exemplo n.º 1
0
 public function bind(array $taintedValues = null, array $taintedFiles = null)
 {
     $new_occurrences = new BaseForm();
     if (isset($taintedValues['kalParams'])) {
         foreach ($taintedValues['kalParams'] as $key => $new_occurrence) {
             $kalparam = new EiFunctionHasParam();
             $kalparam->setKalFunction($this->getObject());
             $occurrence_form = new EiFunctionHasParamForm($kalparam);
             $new_occurrences->embedForm($key, $occurrence_form);
         }
         $this->embedForm('kalParams', $new_occurrences);
     }
     parent::bind($taintedValues, $taintedFiles);
 }
 public function configure()
 {
     if (!($kalfunction = $this->getOption('kalfunction'))) {
         throw new InvalidArgumentException('You must provide a function object.');
     }
     if (!($param_type = $this->getOption('param_type'))) {
         throw new InvalidArgumentException('You must provide a Type for parameter.');
     }
     for ($i = 0; $i <= $this->getOption('size'); $i++) {
         $kalparam = new EiFunctionHasParam();
         $kalparam->setKalFunction($kalfunction);
         $kalparam->setParamType($param_type);
         $form = new EiFunctionHasParamForm($kalparam);
         $this->embedForm($i, $form);
     }
 }