for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Ajax\bootstrap\html\base;
use Ajax\bootstrap\html\HtmlBadge;
use Ajax\bootstrap\html\HtmlLabel;
use Ajax\bootstrap\html\HtmlGlyphicon;
use Ajax\common\html\HtmlDoubleElement;
class HtmlBsDoubleElement extends HtmlDoubleElement {
public function addBadge($caption, $leftSeparator=" ") {
$badge=new HtmlBadge("badge-".$this->identifier, $caption);
$badge->wrap($leftSeparator);
$this->addContent($badge);
return $this;
}
public function addLabel($caption, $style="label-default", $leftSeparator=" ") {
$label=new HtmlLabel("label-".$this->identifier, $caption, $style);
$label->wrap($leftSeparator);
$this->addContent($label);
public function addGlyph($glyphicon,$before=true){
$glyph=new HtmlGlyphicon("");
$glyph->setGlyphicon($glyphicon);
$this->addContent($glyph,$before);
public function wrapContentWithGlyph($glyphBefore,$glyphAfter=""){
$before=HtmlGlyphicon::getGlyphicon($glyphBefore)." ";
$after="";
if($glyphAfter!==""){
$after=" ".HtmlGlyphicon::getGlyphicon($glyphAfter);
return $this->wrapContent($before,$after);