22 $numCols=min(12,$numCols);
23 $numCols=max(1,$numCols);
25 for ($i=0;$i<$numCols;$i++){
32 $col=
new HtmlGridCol($this->identifier.
"-col-".(
sizeof($this->cols)+1),$size,$width);
38 $col=$this->
addCol($size,$width);
39 return $col->setOffset($size, max($offset,
sizeof($this->cols)+1));
42 public function getCol($index,$force=
true){
44 if($index<
sizeof($this->cols)+1){
45 $result=$this->cols[$index-1];
54 foreach ($this->cols as $col){
55 $offsets=$col->getOffsets();
56 if($result=array_search($offset, $offsets)){
60 if(!$result || isset($result)===
false){
61 $result=$this->
getCol($offset,$force);
68 foreach ($this->cols as $col){
71 return parent::compile($js,$view);
78 foreach ($this->cols as $col){
85 $col->setWidth($size,$width+1);
86 $this->
delete($size,$start+1, $width);
90 while($start<
sizeof($this->cols)+1 && $width>0){
93 $widthCol=$col->getWidth($size);
94 if($widthCol<=$width){
95 unset($this->cols[$start-1]);
96 $this->cols = array_values($this->cols);
97 $width=$width-$widthCol;
getCol($index, $force=true)
setContentForAll($content)
merge($size=CssSize::SIZE_MD, $start, $width)
addColAt($size=CssSize::SIZE_MD, $width=1, $offset=1)
addContent($content, $before=false)
setProperty($name, $value)
addCol($size=CssSize::SIZE_MD, $width=1)
getColAt($offset, $force=true)
__construct($identifier, $numCols=NULL)
Inner element for Twitter Bootstrap Grid col.
Inner element for Twitter Bootstrap Grid row.
compile(JsUtils $js=NULL, &$view=NULL)