10 public function __construct(
$identifier, $items = array(), $label = NULL, $value =
"", $multiple =
false, $associative =
true) {
16 return $this->
getField()->setItems($items);
19 public function addItem($item, $value = NULL, $image = NULL) {
20 return $this->
getField()->addItem($item, $value, $image);
32 return $this->
getField()->getInput();
35 public function asSelect($name = NULL, $multiple =
false, $selection =
true) {
36 $this->
getField()->asSelect($name, $multiple, $selection);
41 return $this->
getField()->setClearable($value);
50 $field = $this->content[
"field"];
51 $label = $this->content[
"label"];
52 $field->addContent($label);
56 $this->content[
"field"]->asButton($floating);
57 return $this->content[
"field"];
68 public function addAction($action, $direction = Direction::RIGHT, $icon = NULL, $labeled =
false) {
69 $this->
getField()->setStyle(
'display:inline-block; width: auto');
71 if (\is_object($action) ===
false) {
72 $actionO =
new HtmlButton(
"action-" . $this->identifier, $action);
74 $actionO->addIcon($icon,
true, $labeled);
76 $this->
addContent($actionO, \strstr($direction, Direction::LEFT) !==
false);