public function addGlyph($glyphicon, $index = 0)
 {
     $glyph = new HtmlGlyphicon("");
     $glyph->setGlyphicon($glyphicon);
     $this->addContent($glyph);
     return $this;
 }
Ejemplo n.º 2
0
 public function addGlyph($glyphicon, $before = true)
 {
     $glyph = new HtmlGlyphicon("");
     $glyph->setGlyphicon($glyphicon);
     $this->addContent($glyph, $before);
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * return an instance of GlyphButton with a glyph defined by string or index
  * @param string|int $glyph
  * @return \Ajax\bootstrap\html\HtmlGlyphicon
  */
 public static function getGlyphicon($glyph)
 {
     $result = new HtmlGlyphicon("");
     if (is_int($glyph)) {
         $glyphs = CssGlyphicon::getConstants();
         if ($glyph < sizeof($glyphs)) {
             $glyph = array_values($glyphs)[$glyph];
         }
     }
     $result->setGlyphicon($glyph);
     return $result;
 }
 public function addGlyph($glyphicon, $left = true, $separator = "&nbsp;")
 {
     $glyph = new HtmlGlyphicon("glyph-" . $this->identifier);
     $glyph->setGlyphicon($glyphicon);
     if ($left) {
         $this->content = $glyph->compile() . $separator . $this->content;
     } else {
         $this->content .= $separator . $glyph->compile();
     }
     return $this;
 }