src/User/Model/User.php
protected function getStateFormatted(UserEntity $user) 
	{
		switch($user->getState()) {
			case UserEntity::USER_STATE_ACTIVE:
				$this->stateClass = 'success';
				return 'Attivo';
				break;
			case UserEntity::USER_STATE_BANNED:
				$this->stateClass = 'danger';
				return 'Bannato';
				break;
			case UserEntity::USER_STATE_DEACTIVE:
				$this->stateClass = 'warning';
				return 'Disattivo';
				break;
			case UserEntity::USER_STATE_DELETED:
				$this->stateClass = 'danger';
				return 'Eliminato';
				break;
		}

		$this->stateClass = 'danger';
		return 'Error with user state';
	}
protected function getStateFormatted(UserEntity $user) 
	{
		switch($user->getState()) {
			case UserEntity::USER_STATE_ACTIVE:
				$this->stateClass = 'success';
				return 'Attivo';
				break;
			case UserEntity::USER_STATE_BANNED:
				$this->stateClass = 'danger';
				return 'Bannato';
				break;
			case UserEntity::USER_STATE_DEACTIVE:
				$this->stateClass = 'warning';
				return 'Disattivo';
				break;
			case UserEntity::USER_STATE_DELETED:
				$this->stateClass = 'danger';
				return 'Eliminato';
				break;
		}

		$this->stateClass = 'danger';
		return 'Error with user state';
	}
protected function getStateFormatted ( UserEntity $ user ) { switch ( $ user -> getState ( ) ) { case UserEntity :: USER_STATE_ACTIVE : $ this -> stateClass = 'success' ; return 'Attivo' ; break ; case UserEntity :: USER_STATE_BANNED : $ this -> stateClass = 'danger' ; return 'Bannato' ; break ; case UserEntity :: USER_STATE_DEACTIVE : $ this -> stateClass = 'warning' ; return 'Disattivo' ; break ; case UserEntity :: USER_STATE_DELETED : $ this -> stateClass = 'danger' ; return 'Eliminato' ; break ; } $ this -> stateClass = 'danger' ; return 'Error with user state' ; }
This will fill the stateClass as well

@param UserEntity $user
@return string
This will fill the stateClass as well