<?php
namespace Moto\Application\ContentSection\InputFilter; use Moto; class Save extends Moto\InputFilter\AbstractInputFilter { protected $_name = 'contentSection.save'; public function init() { $this->add(array( 'name' => 'enabled', 'required' => false, 'filters' => array( array('name' => 'Boolean'), array( 'name' => 'Moto\Filter\DefaultFilter', 'options' => array( 'value' => true ) ), ), 'validators' => array( array( 'name' => 'InArray', 'options' => array( 'haystack' => array(false, true) ) ), ), )); $this->add(array( 'name' => 'show_comments', 'required' => false, 'filters' => array( array('name' => 'Boolean'), array( 'name' => 'Moto\Filter\DefaultFilter', 'options' => array( 'value' => false ) ), ), 'validators' => array( array( 'name' => 'InArray', 'options' => array( 'haystack' => array(false, true) ) ), ), )); $this->add(array( 'name' => 'comments_language', 'required' => false, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'StringLength', 'options' => array( 'encoding' => 'UTF-8', 'min' => 2, 'max' => 5, ), ), ), )); $this->add(array( 'name' => 'date_format', 'required' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), array( 'name' => 'Moto\Filter\DefaultFilter', 'options' => array( 'value' => 'd.m.Y' ) ), ), 'validators' => array( array( 'name' => 'InArray', 'options' => array( 'haystack' => array('Y-m-d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'm.d.Y') ) ), ), )); $this->add(array( 'name' => 'design', 'required' => false, 'filters' => array( array('name' => 'StripTags') ) )); } }