public function getLabelTextFromField($fieldName = null) {
		$text = '';
		if (empty($fieldName)) {
			return $text;
		}

		if (strpos($fieldName, '.') !== false) {
			$fieldElements = explode('.', $fieldName);
			$text = array_pop($fieldElements);
		} else {
			$text = $fieldName;
		}
		if (substr($text, -3) === '_id') {
			$text = substr($text, 0, -3);
		}
		$text = Inflector::humanize(Inflector::underscore($text));

		return $text;
	}
public function getLabelTextFromField($fieldName = null) {
		$text = '';
		if (empty($fieldName)) {
			return $text;
		}

		if (strpos($fieldName, '.') !== false) {
			$fieldElements = explode('.', $fieldName);
			$text = array_pop($fieldElements);
		} else {
			$text = $fieldName;
		}
		if (substr($text, -3) === '_id') {
			$text = substr($text, 0, -3);
		}
		$text = Inflector::humanize(Inflector::underscore($text));

		return $text;
	}
public function getLabelTextFromField ( $ fieldName = null ) { $ text = '' ; if ( empty ( $ fieldName ) ) { return $ text ; } if ( strpos ( $ fieldName , '.' ) !== false ) { $ fieldElements = explode ( '.' , $ fieldName ) ; $ text = array_pop ( $ fieldElements ) ; } else { $ text = $ fieldName ; } if ( substr ( $ text , - 3 ) === '_id' ) { $ text = substr ( $ text , 0 , - 3 ) ; } $ text = Inflector :: humanize ( Inflector :: underscore ( $ text ) ) ; return $ text ; }
Returns text for label from field name.

@param string $fieldName Field name
@return string Text for label
Returns text for label from field name .