phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
HtmlViewGroups.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\content\view
;
4
5
use
Ajax\semantic\html\base\HtmlSemCollection
;
6
use
Ajax\service\JArray
;
7
use
Ajax\semantic\html\base\constants\Wide
;
8
use
Ajax\JsUtils
;
9
10
abstract
class
HtmlViewGroups
extends
HtmlSemCollection
{
11
12
public
function
__construct
(
$identifier
, $uiClass,$items=array()) {
13
parent::__construct(
$identifier
,
"div"
, $uiClass);
14
$this->
addItems
($items);
15
}
16
17
abstract
protected
function
createElement
();
18
19
protected
function
createItem
($value) {
20
$result=$this->
createElement
();
21
if
(\is_array($value)) {
22
$header=
JArray::getValue
($value,
"header"
, 0);
23
$metas=
JArray::getValue
($value,
"metas"
, 1);
24
$description=
JArray::getValue
($value,
"description"
, 2);
25
$image=
JArray::getValue
($value,
"image"
, 3);
26
$extra=
JArray::getValue
($value,
"extra"
, 4);
27
if
(isset($image)) {
28
$result->addImage($image);
29
}
30
$result->addItemHeaderContent($header, $metas, $description);
31
if
(isset($extra)) {
32
$result->addExtraContent($extra);
33
}
34
}
else
35
$result->addItemContent($value);
36
return
$result;
37
}
38
43
public
function
setWide
($wide) {
44
$wide=
Wide::getConstants
()[
"W"
. $wide];
45
return
$this->
addToPropertyCtrl
(
"class"
, $wide,
Wide::getConstants
());
46
}
47
48
abstract
public
function
newItem
(
$identifier
);
49
53
public
function
getItem
($index){
54
return
parent::getItem
($index);
55
}
56
57
public
function
getItemContent
($itemIndex, $contentIndex) {
58
$item=$this->
getItem
($itemIndex);
59
if
(isset($item)) {
60
return
$item->getItemContent($contentIndex);
61
}
62
}
63
64
public
function
fromDatabaseObject
($object, $function) {
65
return
$this->
addItem
($function($object));
66
}
67
68
public
function
run
(
JsUtils
$js){
69
$result=
parent::run
($js);
70
return
$result->setItemSelector(
".item"
);
71
}
72
}
Ajax\service\JArray\getValue
static getValue($array, $key, $pos)
Definition:
JArray.php:10
Wide
Ajax\semantic\html\content\view\HtmlViewGroups\newItem
newItem($identifier)
Ajax\common\html\HtmlCollection\addItems
addItems($items)
Definition:
HtmlCollection.php:22
HtmlSemCollection
Ajax\common\BaseEnum\getConstants
static getConstants()
Definition:
BaseEnum.php:17
Ajax\semantic\html\content\view\HtmlViewGroups\createElement
createElement()
Ajax\semantic\html\base\traits\run
run(JsUtils $js)
Definition:
HasTimeoutTrait.php:20
Ajax\semantic\html\content\view\HtmlViewGroups\setWide
setWide($wide)
Defines the ites width (alias for setWidth)
Definition:
HtmlViewGroups.php:43
Ajax\semantic\html\collections\form\traits\getItem
getItem($index)
Ajax\common\html\HtmlCollection\addItem
addItem($item)
adds and returns an item
Definition:
HtmlCollection.php:65
Ajax\semantic\html\content\view\HtmlViewGroups\fromDatabaseObject
fromDatabaseObject($object, $function)
Definition:
HtmlViewGroups.php:64
Ajax\semantic\html\content\view\HtmlViewGroups\createItem
createItem($value)
Definition:
HtmlViewGroups.php:19
Ajax\semantic\html\content\view\HtmlViewGroups\__construct
__construct($identifier, $uiClass, $items=array())
Definition:
HtmlViewGroups.php:12
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition:
BaseWidget.php:14
Ajax\semantic\html\base\HtmlSemCollection
Base class for Semantic Html collections.
Definition:
HtmlSemCollection.php:13
Ajax\semantic\html\content\view\HtmlViewGroups\getItem
getItem($index)
Definition:
HtmlViewGroups.php:53
Ajax\JsUtils
JQuery PHP library.
Definition:
JsUtils.php:23
Ajax\semantic\html\content\view
Definition:
ContentPartTrait.php:2
JsUtils
Ajax\semantic\html\content\view\HtmlViewGroups\run
run(JsUtils $js)
Definition:
HtmlViewGroups.php:68
Ajax\common\html\traits\addToPropertyCtrl
addToPropertyCtrl($name, $value, $typeCtrl)
Definition:
BaseHtmlPropertiesTrait.php:87
Ajax\semantic\html\content\view\HtmlViewGroups
Definition:
HtmlViewGroups.php:10
Ajax\semantic\html\content\view\HtmlViewGroups\getItemContent
getItemContent($itemIndex, $contentIndex)
Definition:
HtmlViewGroups.php:57
JArray
Ajax
semantic
html
content
view
HtmlViewGroups.php
Generated on Thu Sep 19 2024 23:26:03 for
phpMv-UI
by
doxygen
1.8.13