2nd release

This commit is contained in:
Paolo
2017-04-21 19:03:20 +02:00
parent 11d3d7d7c0
commit ebd892e333
4 changed files with 35 additions and 4 deletions
+30
View File
@@ -738,6 +738,36 @@ class DropdownWidget extends Widget
private $elementsArray; // Array of elements to be place inside the dropdown
/**
*
*/
public function displayElements($elements, $widgetData)
{
$this->setElementsArray(success($this->convert($elements)), true);
$this->loadDropDownView($widgetData);
echo $this->content();
}
/**
*
*/
public static function convert($elements)
{
$returnArray = array();
foreach($elements as $key => $val)
{
$element = new stdClass();
$element->id = $key;
$element->description = $val;
array_push($returnArray, $element);
}
return $returnArray;
}
/**
* Loads the dropdown view with all the elements to be displayed
*/