<?php
namespace Moto\Application\MediaLibrary\InputFilter; use Moto\InputFilter\AbstractInputFilter; use Zend\InputFilter\Exception; use Moto; class MoveItems extends AbstractInputFilter { protected $_name = 'mediaLibraryItem.move'; public function init() { $this->add(array( 'name' => 'id', 'type' => 'Zend\InputFilter\ArrayInput', 'required' => true, 'continue_if_empty' => false, 'validators' => array( array( "name" => "NotEmpty" ), array( "name" => "Digits" ) ) )); $this->add(array( 'name' => 'folder_id', 'required' => true, 'validators' => array( array( 'name' => 'Digits', 'break_chain_on_failure' => true, ), array( 'name' => 'Moto\Validator\ParentId', 'options' => array( 'table' => Moto\Config::get('database.prefix') . 'media_folders', 'field' => 'id', 'adapter' => Moto\Config::get('databaseAdapter'), ) ) ), )); } }