protected function getStateFormatted(Document $document) 
	{
		switch($document->getState()) {
			case Document::DOCUMENT_STATE_ACTIVE:
				$this->stateClass = 'success';
				return 'Attivo';
				break;
			case Document::DOCUMENT_STATE_DEACTIVE:
				$this->stateClass = 'warning';
				return 'Disattivo';
				break;
			case Document::DOCUMENT_STATE_DELETED:
				$this->stateClass = 'danger';
				return 'Eliminato';
				break;
		}

		$this->stateClass = 'danger';
		return 'Error with document state';
	}
protected function getStateFormatted(Document $document) 
	{
		switch($document->getState()) {
			case Document::DOCUMENT_STATE_ACTIVE:
				$this->stateClass = 'success';
				return 'Attivo';
				break;
			case Document::DOCUMENT_STATE_DEACTIVE:
				$this->stateClass = 'warning';
				return 'Disattivo';
				break;
			case Document::DOCUMENT_STATE_DELETED:
				$this->stateClass = 'danger';
				return 'Eliminato';
				break;
		}

		$this->stateClass = 'danger';
		return 'Error with document state';
	}
protected function getStateFormatted ( Document $ document ) { switch ( $ document -> getState ( ) ) { case Document :: DOCUMENT_STATE_ACTIVE : $ this -> stateClass = 'success' ; return 'Attivo' ; break ; case Document :: DOCUMENT_STATE_DEACTIVE : $ this -> stateClass = 'warning' ; return 'Disattivo' ; break ; case Document :: DOCUMENT_STATE_DELETED : $ this -> stateClass = 'danger' ; return 'Eliminato' ; break ; } $ this -> stateClass = 'danger' ; return 'Error with document state' ; }
This will fill the stateClass as well

@param Document $document
@return string
This will fill the stateClass as well