<?php
 namespace Engine\Form\Input; class Cloned_SortableText extends \Engine\Form\Input\Text { protected $class = "clonedSortableText"; public function __construct($label=null, $name=null, $value=null) { parent::__construct($label, $name, $value); $this->settings['minItems'] = 1; $this->settings['startIndex'] = 0; $this->settings['operations'] = []; $this->settings['operations']['add'] = true; $this->settings['operations']['remove'] = true; $this->settings['operations']['move'] = true; } public function setValue($value) { if (!is_array($value)) { $value = []; } foreach($value as $v){ $this->value[] = $v; } return $this; } } 