<?php

namespace App\Form\Input;

/**
 * class for a list of sortable hidden fields
 * @author Dan
 */
class SortableList extends \Engine\Form\Input\ElementAbstract
{
	protected $class = "sortableList";
	protected $listItems = [];


	/**
	 * (non-PHPdoc)
	 * @see \Engine\Form\Input\ElementAbstract::getTemplateParams()
	 */
	protected function getTemplateParams($templateClass = null, $parentElement = null)
	{
		$params = parent::getTemplateParams($templateClass, $parentElement );
		$params['listItems'] = $this->listItems;

		return $params;
	}

	/**
	 * Get the list of possible values
	 * @return Array
	 */
	public function getListItems()
	{
		return $this->listItems;
	}

	/**
	 * Set the list of possible values
	 * @param Array $listItems associative list. key=>LANG
	 */
	public function setListItems($listItems)
	{
		$this->listItems= $listItems; return $this;
	}

}
