phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlGridSystem.php
Go to the documentation of this file.
1
<?php
2
namespace
Ajax\bootstrap\html
;
3
4
use
Ajax\bootstrap\html\base\HtmlBsDoubleElement
;
5
use
Ajax\bootstrap\html\content\HtmlGridRow
;
6
use
Ajax\bootstrap\html\content\HtmlGridCol
;
7
use
Ajax\JsUtils
;
8
9
16
class
HtmlGridSystem
extends
HtmlBsDoubleElement
{
17
private
$rows
;
18
19
public
function
__construct
(
$identifier
,$numRows=1,$numCols=NULL){
20
parent::__construct(
$identifier
,
"div"
);
21
$this->
setProperty
(
"class"
,
"container-fluid"
);
22
$this->rows=array();
23
$this->
setNumRows
($numRows,$numCols);
24
}
25
31
public
function
addRow
($numCols=NULL){
32
$row=
new
HtmlGridRow
($this->identifier.
"-row-"
.(
sizeof
($this->rows)+1),$numCols);
33
$this->rows[]=$row;
34
return
$row;
35
}
36
43
public
function
getRow
($index,$force=
true
){
44
if
($index<
sizeof
($this->rows)){
45
$result=$this->rows[$index-1];
46
}
else
if
($force){
47
$this->
setNumRows
($index);
48
$result=$this->rows[$index-1];
49
}
50
return
$result;
51
}
52
59
public
function
setNumRows
($numRows,$numCols=NULL){
60
for
($i=
sizeof
($this->rows);$i<$numRows;$i++){
61
$this->
addRow
($numCols);
62
}
63
return
$this;
64
}
65
72
public
function
getCell
($row,$col,$force=
true
){
73
$row=$this->
getRow
($row,$force);
74
if
(isset($row)){
75
$col=$row->getCol($col,$force);
76
}
77
return
$col;
78
}
79
85
public
function
getCellAt
($row,$col,$force=
true
){
86
$row=$this->
getRow
($row,$force);
87
if
(isset($row)){
88
$col=$row->getColAt($col,$force);
89
}
90
return
$col;
91
}
92
93
public
function
compile
(
JsUtils
$js=NULL, &$view=NULL) {
94
foreach
($this->rows as $row){
95
$this->
addContent
($row);
96
}
97
return
parent::compile($js,$view);
98
}
99
public
function
setContentForAll
(
$content
){
100
foreach
($this->rows as $row){
101
$row->setContentForAll(
$content
);
102
}
103
}
104
}
Ajax\JsUtils
JQuery PHP library.
Definition
JsUtils.php:23
Ajax\bootstrap\html\HtmlGridSystem
Composant Twitter Bootstrap Grid system.
Definition
HtmlGridSystem.php:16
Ajax\bootstrap\html\HtmlGridSystem\setNumRows
setNumRows($numRows, $numCols=NULL)
Create $numRows rows.
Definition
HtmlGridSystem.php:59
Ajax\bootstrap\html\HtmlGridSystem\addRow
addRow($numCols=NULL)
Add a new row.
Definition
HtmlGridSystem.php:31
Ajax\bootstrap\html\HtmlGridSystem\getRow
getRow($index, $force=true)
return the row at $index
Definition
HtmlGridSystem.php:43
Ajax\bootstrap\html\HtmlGridSystem\getCellAt
getCellAt($row, $col, $force=true)
Definition
HtmlGridSystem.php:85
Ajax\bootstrap\html\HtmlGridSystem\getCell
getCell($row, $col, $force=true)
Definition
HtmlGridSystem.php:72
Ajax\bootstrap\html\HtmlGridSystem\compile
compile(JsUtils $js=NULL, &$view=NULL)
Definition
HtmlGridSystem.php:93
Ajax\bootstrap\html\HtmlGridSystem\setContentForAll
setContentForAll($content)
Definition
HtmlGridSystem.php:99
Ajax\bootstrap\html\HtmlGridSystem\$rows
$rows
Definition
HtmlGridSystem.php:17
Ajax\bootstrap\html\HtmlGridSystem\__construct
__construct($identifier, $numRows=1, $numCols=NULL)
Definition
HtmlGridSystem.php:19
Ajax\bootstrap\html\base\HtmlBsDoubleElement
Definition
HtmlBsDoubleElement.php:10
Ajax\bootstrap\html\content\HtmlGridCol
Inner element for Twitter Bootstrap Grid col.
Definition
HtmlGridCol.php:15
Ajax\bootstrap\html\content\HtmlGridRow
Inner element for Twitter Bootstrap Grid row.
Definition
HtmlGridRow.php:15
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\HtmlDoubleElement\$content
$content
Definition
HtmlDoubleElement.php:14
Ajax\common\html\HtmlDoubleElement\addContent
addContent($content, $before=false)
Definition
HtmlDoubleElement.php:36
Ajax\common\html\traits\BaseHtmlPropertiesTrait\setProperty
setProperty($name, $value)
Definition
BaseHtmlPropertiesTrait.php:30
Ajax\bootstrap\html
Ajax
bootstrap
html
HtmlGridSystem.php
Generated on Sun Dec 10 2023 16:15:53 for
phpMv-UI
by
doxygen
1.9.8