phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
State.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\html\base\constants
;
4
5
use
Ajax\common\BaseEnum
;
6
use
Ajax\common\html\BaseHtml
;
7
8
abstract
class
State
extends
BaseEnum
{
9
const
ACTIVE
=
"active"
,
DISABLED
=
"disabled"
,
ERROR
=
"error"
,
FOCUS
=
"focus"
,
LOADING
=
"loading"
,
NEGATIVE
=
"negative"
,
POSITIVE
=
"positive"
,
SUCCESS
=
"success"
,
WARNING
=
"warning"
;
10
11
public
static
function
add
($state, $elements) {
12
if
(!\is_array($state)) {
13
$state=\explode(
" "
, $state);
14
}
15
if
(\is_array($elements)) {
16
foreach
( $elements as $element ) {
17
if
($element instanceof
BaseHtml
) {
18
self::_add
($state, $element);
19
}
20
}
21
}
22
}
23
24
private
static
function
_add
($states, $element) {
25
foreach
( $states as $state ) {
26
$element->addToPropertyCtrl(
"class"
, $state, array ($state ));
27
}
28
}
29
}
Ajax\common\BaseEnum
Base class for enums see at http://stackoverflow.com/questions/254514/php-and-enumerations.
Definition
BaseEnum.php:11
Ajax\common\html\BaseHtml
BaseHtml for HTML components.
Definition
BaseHtml.php:17
Ajax\semantic\html\base\constants\State
Definition
State.php:8
Ajax\semantic\html\base\constants\State\POSITIVE
const POSITIVE
Definition
State.php:9
Ajax\semantic\html\base\constants\State\SUCCESS
const SUCCESS
Definition
State.php:9
Ajax\semantic\html\base\constants\State\DISABLED
const DISABLED
Definition
State.php:9
Ajax\semantic\html\base\constants\State\add
static add($state, $elements)
Definition
State.php:11
Ajax\semantic\html\base\constants\State\LOADING
const LOADING
Definition
State.php:9
Ajax\semantic\html\base\constants\State\ERROR
const ERROR
Definition
State.php:9
Ajax\semantic\html\base\constants\State\_add
static _add($states, $element)
Definition
State.php:24
Ajax\semantic\html\base\constants\State\ACTIVE
const ACTIVE
Definition
State.php:9
Ajax\semantic\html\base\constants\State\NEGATIVE
const NEGATIVE
Definition
State.php:9
Ajax\semantic\html\base\constants\State\FOCUS
const FOCUS
Definition
State.php:9
Ajax\semantic\html\base\constants\State\WARNING
const WARNING
Definition
State.php:9
Ajax\semantic\html\base\constants
Definition
CheckboxType.php:3
Ajax
semantic
html
base
constants
State.php
Generated on Sun Dec 10 2023 16:16:03 for
phpMv-UI
by
doxygen
1.9.8