public function getStateElement($state = null) {
		if (is_bool($state) && ($state === true)) {
			$state = 2;
		}

		switch ((int)$state) {
			case 2:
				$stateText = $this->Html->tag('span', '', ['class' => 'fas fa-check']);
				$titleText = __d('cake_installer', 'Ok');
				$labelClass = 'label-success';
				break;
			case 1:
				$stateText = $this->Html->tag('span', '', ['class' => 'fas fa-minus']);
				$titleText = __d('cake_installer', 'Ok');
				$labelClass = 'label-warning';
				break;
			default:
				$stateText = $this->Html->tag('span', '', ['class' => 'fas fa-times']);
				$titleText = __d('cake_installer', 'Bad');
				$labelClass = 'label-danger';
		}

		return $this->Html->tag('span', $stateText, [
			'class' => 'label' . ' ' . $labelClass,
			'title' => $titleText, 'data-toggle' => 'tooltip']);
	}
public function getStateElement($state = null) {
		if (is_bool($state) && ($state === true)) {
			$state = 2;
		}

		switch ((int)$state) {
			case 2:
				$stateText = $this->Html->tag('span', '', ['class' => 'fas fa-check']);
				$titleText = __d('cake_installer', 'Ok');
				$labelClass = 'label-success';
				break;
			case 1:
				$stateText = $this->Html->tag('span', '', ['class' => 'fas fa-minus']);
				$titleText = __d('cake_installer', 'Ok');
				$labelClass = 'label-warning';
				break;
			default:
				$stateText = $this->Html->tag('span', '', ['class' => 'fas fa-times']);
				$titleText = __d('cake_installer', 'Bad');
				$labelClass = 'label-danger';
		}

		return $this->Html->tag('span', $stateText, [
			'class' => 'label' . ' ' . $labelClass,
			'title' => $titleText, 'data-toggle' => 'tooltip']);
	}
public function getStateElement ( $ state = null ) { if ( is_bool ( $ state ) && ( $ state === true ) ) { $ state = 2 ; } switch ( ( int ) $ state ) { case 2 : $ stateText = $ this -> Html -> tag ( 'span' , '' , [ 'class' => 'fas fa-check' ] ) ; $ titleText = __d ( 'cake_installer' , 'Ok' ) ; $ labelClass = 'label-success' ; break ; case 1 : $ stateText = $ this -> Html -> tag ( 'span' , '' , [ 'class' => 'fas fa-minus' ] ) ; $ titleText = __d ( 'cake_installer' , 'Ok' ) ; $ labelClass = 'label-warning' ; break ; default : $ stateText = $ this -> Html -> tag ( 'span' , '' , [ 'class' => 'fas fa-times' ] ) ; $ titleText = __d ( 'cake_installer' , 'Bad' ) ; $ labelClass = 'label-danger' ; } return $ this -> Html -> tag ( 'span' , $ stateText , [ 'class' => 'label' . ' ' . $ labelClass , 'title' => $ titleText , 'data-toggle' => 'tooltip' ] ) ; }
Build HTML element with status icon from status value

@param int $state State for build HTML elemeth.
Integer value:
- `0` - Bad;
- `1` - Warning;
- `2` - Success.
@return string Result HTML element with status text
Build HTML element with status icon from status value