Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getInputFilter()
- {
- if (!$this->inputFilter) {
- $inputFilter = new InputFilter();
- $factory = new InputFactory();
- $inputFilter->add($factory->createInput(array(
- 'name' => 'id',
- 'required' => true,
- 'filters' => array(
- array('name' => 'Int'),
- ),
- )));
- $inputFilter->add($factory->createInput(array(
- 'name' => 'agencyName',
- 'required' => true,
- 'filters' => array(
- array('name' => 'StripTags'),
- array('name' => 'StringTrim'),
- ),
- 'validators' => array(
- array(
- 'name' => 'StringLength',
- 'options' => array(
- 'encoding' => 'UTF-8',
- 'min' => 1,
- 'max' => 100,
- ),
- ),
- ),
- )));
- $inputFilter->add($factory->createInput(array(
- 'name' => 'applicationUrl',
- 'required' => true,
- 'filters' => array(
- array('name' => 'StripTags'),
- array('name' => 'StringTrim'),
- ),
- 'validators' => array(
- array(
- 'name' => 'StringLength',
- 'options' => array(
- 'encoding' => 'UTF-8',
- 'min' => 1,
- 'max' => 200,
- ),
- ),
- ),
- )));
- $inputFilter->add($factory->createInput(array(
- 'type' => 'Zend\InputFilter\FileInput',
- 'name' => 'logoName',
- 'required' => true,
- 'validators' => array(
- array(
- 'name' => 'File\MimeType',
- 'options' => array(
- 'mimeType' => 'image/png'
- )
- )
- )
- )));
- $inputFilter->add($factory->createInput(array(
- 'type' => 'Zend\InputFilter\FileInput',
- 'name' => 'cssFilename',
- 'required' => true,
- 'validators' => array(
- array(
- 'name' => 'File\MimeType',
- 'options' => array(
- 'mimeType' => 'text'
- )
- )
- )
- )));
- $this->inputFilter = $inputFilter;
- }
- return $this->inputFilter;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement