phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlStepItem.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\content
;
4
5
use
Ajax\service\JArray
;
6
use
Ajax\semantic\html\base\constants\StepStatus
;
7
8
class
HtmlStepItem
extends
HtmlAbsractItem
{
9
10
public
function
__construct
(
$identifier
,
$content
) {
11
parent::__construct(
$identifier
,
"step"
,
$content
);
12
}
13
protected
function
initContent
(
$content
){
14
if
(\is_array(
$content
)){
15
$icon=JArray::getValue(
$content
,
"icon"
, 0);
16
$title=JArray::getValue(
$content
,
"title"
, 1);
17
$desc=JArray::getValue(
$content
,
"description"
, 2);
18
$status=JArray::getValue(
$content
,
"status"
, 3);
19
if
(isset($icon)){
20
$this->
setIcon
($icon);
21
}
22
if
(isset($status)){
23
$this->
setStatus
($status);
24
}
25
if
(isset($title)){
26
$this->
setTitle
($title,$desc);
27
}
28
}
else
{
29
$this->
setContent
(
$content
);
30
}
31
}
32
33
public
function
setActive
($value=
true
){
34
if
($value)
35
$this->
setStatus
(
StepStatus::ACTIVE
);
36
else
37
$this->
setStatus
(
StepStatus::NONE
);
38
return
$this;
39
}
40
41
public
function
setCompleted
(){
42
$this->
removePropertyValues
(
"class"
, [
StepStatus::COMPLETED
,
StepStatus::DISABLED
]);
43
return
$this->
setStatus
(
StepStatus::COMPLETED
);
44
}
45
46
public
function
setStatus
($status){
47
return
$this->
addToPropertyCtrl
(
"class"
, $status,
StepStatus::getConstants
());
48
}
49
50
public
function
removeStatus
(){
51
$this->
removePropertyValues
(
"class"
,
StepStatus::getConstants
());
52
}
53
}
Ajax\common\BaseEnum\getConstants
static getConstants()
Definition
BaseEnum.php:17
Ajax\common\html\BaseWidget\$identifier
$identifier
Definition
BaseWidget.php:14
Ajax\common\html\HtmlDoubleElement\setContent
setContent($content)
Definition
HtmlDoubleElement.php:27
Ajax\common\html\HtmlDoubleElement\$content
$content
Definition
HtmlDoubleElement.php:14
Ajax\common\html\traits\BaseHtmlPropertiesTrait\removePropertyValues
removePropertyValues($name, $values)
Definition
BaseHtmlPropertiesTrait.php:73
Ajax\semantic\html\base\constants\StepStatus
Definition
StepStatus.php:7
Ajax\semantic\html\base\constants\StepStatus\DISABLED
const DISABLED
Definition
StepStatus.php:8
Ajax\semantic\html\base\constants\StepStatus\COMPLETED
const COMPLETED
Definition
StepStatus.php:8
Ajax\semantic\html\base\constants\StepStatus\ACTIVE
const ACTIVE
Definition
StepStatus.php:8
Ajax\semantic\html\base\constants\StepStatus\NONE
const NONE
Definition
StepStatus.php:8
Ajax\semantic\html\base\traits\BaseTrait\addToPropertyCtrl
addToPropertyCtrl($name, $value, $typeCtrl)
Ajax\semantic\html\content\HtmlAbsractItem
Definition
HtmlAbsractItem.php:12
Ajax\semantic\html\content\HtmlAbsractItem\setIcon
setIcon($icon)
Definition
HtmlAbsractItem.php:22
Ajax\semantic\html\content\HtmlAbsractItem\setTitle
setTitle($title, $description=NULL, $baseClass="title")
Definition
HtmlAbsractItem.php:62
Ajax\semantic\html\content\HtmlStepItem
Definition
HtmlStepItem.php:8
Ajax\semantic\html\content\HtmlStepItem\initContent
initContent($content)
Definition
HtmlStepItem.php:13
Ajax\semantic\html\content\HtmlStepItem\setActive
setActive($value=true)
show it is currently the active user selection
Definition
HtmlStepItem.php:33
Ajax\semantic\html\content\HtmlStepItem\removeStatus
removeStatus()
Definition
HtmlStepItem.php:50
Ajax\semantic\html\content\HtmlStepItem\__construct
__construct($identifier, $content)
Definition
HtmlStepItem.php:10
Ajax\semantic\html\content\HtmlStepItem\setStatus
setStatus($status)
Definition
HtmlStepItem.php:46
Ajax\semantic\html\content\HtmlStepItem\setCompleted
setCompleted()
Definition
HtmlStepItem.php:41
Ajax\service\JArray
Definition
JArray.php:4
Ajax\semantic\html\content
Definition
HtmlAbsractItem.php:3
Ajax
semantic
html
content
HtmlStepItem.php
Generated on Sun Dec 10 2023 16:16:06 for
phpMv-UI
by
doxygen
1.9.8