<?php
namespace Moto\Application\Presets\InputFilter; use Moto; class Update extends Create { protected $_name = 'presets.save'; public function init() { $this->add(array( 'name' => 'id', 'required' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'Digits', 'break_chain_on_failure' => true, ), array( 'name' => 'Db\RecordExists', 'options' => array( 'table' => Moto\Config::get('database.prefix') . 'presets', 'field' => 'id', 'adapter' => Moto\Config::get('databaseAdapter'), ) ) ), )); parent::init(); $this->remove('widget_name'); $this->remove('class_name'); $this->remove('is_responsive'); $this->remove('template'); } }