protected function createItem($value) { $icon = $value; if (\is_array($value)) { $icon = JArray::getValue($value, "icon", 0); $size = JArray::getValue($value, "size", 1); } $iconO = new HtmlIcon("icon-" . $this->identifier, $icon); if (isset($size)) { $iconO->setSize($size); } return $iconO; }
/** * {@inheritDoc} * @see \Ajax\semantic\html\collections\HtmlMenu::createItem() */ protected function createItem($value) { $text = ""; $v = $value; if (\is_array($value)) { $v = @$value[0]; $text = @$value[1]; } $count = \sizeof($this->content); $value = new HtmlIcon("icon-" . $count, $v); $value->wrap("", $text); $itemO = new HtmlLink("item-" . $count, "", $value); return $itemO->setClass("item"); }
public static function label($identifier, $icon, $label) { $result = new HtmlIcon($identifier, $icon); return $result->addLabel($label); }