protected function execUpload()
    {
        $this->loadTranslations('form', sprintf('private/global/locales/%s/form.ini', LANGUAGE));
        //fields  instances
        foreach($this->uploadFieldsDefinitions as $fieldName => $definition) {
            $validations = isset($definition['validations']) ? $definition['validations'] : null;
            $previewTemplate = isset($definition['previewTemplate']) ? $definition['previewTemplate'] : null;
            $this->uploadFields[$fieldName] = new Upload\Field($fieldName, $validations, $previewTemplate);
            foreach($definition['outputs'] as $outputName => $output) {
                $this->uploadFields[$fieldName]->addOutput($outputName, $output['destination']);
            }
        }
        $this->handleUpload();
        echo $this->outputUploadOutcome();
    }
protected function execUpload()
    {
        $this->loadTranslations('form', sprintf('private/global/locales/%s/form.ini', LANGUAGE));
        //fields  instances
        foreach($this->uploadFieldsDefinitions as $fieldName => $definition) {
            $validations = isset($definition['validations']) ? $definition['validations'] : null;
            $previewTemplate = isset($definition['previewTemplate']) ? $definition['previewTemplate'] : null;
            $this->uploadFields[$fieldName] = new Upload\Field($fieldName, $validations, $previewTemplate);
            foreach($definition['outputs'] as $outputName => $output) {
                $this->uploadFields[$fieldName]->addOutput($outputName, $output['destination']);
            }
        }
        $this->handleUpload();
        echo $this->outputUploadOutcome();
    }
protected function execUpload ( ) { $ this -> loadTranslations ( 'form' , sprintf ( 'private/global/locales/%s/form.ini' , LANGUAGE ) ) ; //fields  instances foreach ( $ this -> uploadFieldsDefinitions as $ fieldName => $ definition ) { $ validations = isset ( $ definition [ 'validations' ] ) ? $ definition [ 'validations' ] : null ; $ previewTemplate = isset ( $ definition [ 'previewTemplate' ] ) ? $ definition [ 'previewTemplate' ] : null ; $ this -> uploadFields [ $ fieldName ] = new Upload \ Field ( $ fieldName , $ validations , $ previewTemplate ) ; foreach ( $ definition [ 'outputs' ] as $ outputName => $ output ) { $ this -> uploadFields [ $ fieldName ] -> addOutput ( $ outputName , $ output [ 'destination' ] ) ; } } $ this -> handleUpload ( ) ; echo $ this -> outputUploadOutcome ( ) ; }
Execs upload action
Execs upload action