<?php
namespace Moto\Application\Settings\InputFilter; use Moto\InputFilter\AbstractInputFilter; use Moto; class SeoWebsiteSettings extends AbstractInputFilter { protected $_name = 'settingsWebsite.seoOptions.SeoWebsiteSettings'; protected $_defaultsValue = array( 'permalinks' => true, ); public function init() { $this->add(array( 'name' => 'permalinks', 'required' => false, 'filters' => array( array('name' => 'Moto\Filter\IntValue'), array('name' => 'Boolean'), ) )); $this->add(array( 'name' => 'suffix', 'required' => false, 'filters' => array( array('name' => 'Moto\Filter\IntValue'), array('name' => 'Boolean'), ) )); $this->add(array( 'name' => 'seo_html_attribute_lang', 'required' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'Regex', 'options' => array( 'pattern' => '/^[a-zA-Z\-\_]{1,20}$/', ) ), ), )); $sub = new AbstractInputFilter(); $this->add($sub, 'open_graph_settings'); $sub->add(array( 'name' => 'default', 'required' => false, 'allow_empty' => true, 'filters' => array( array('name' => 'Moto\Filter\IntValue'), array('name' => 'Boolean'), ), )); } } 