public function getName(Model $model, $id = null) {
		if (empty($id) || empty($model->displayField)) {
			return false;
		}
		if (is_array($id)) {
			if (!isset($id[$model->alias][$model->displayField])) {
				return false;
			}

			$result = $id[$model->alias][$model->displayField];
		} else {
			$model->id = $id;
			$result = $model->field($model->displayField);
		}

		return $result;
	}
public function getName(Model $model, $id = null) {
		if (empty($id) || empty($model->displayField)) {
			return false;
		}
		if (is_array($id)) {
			if (!isset($id[$model->alias][$model->displayField])) {
				return false;
			}

			$result = $id[$model->alias][$model->displayField];
		} else {
			$model->id = $id;
			$result = $model->field($model->displayField);
		}

		return $result;
	}
public function getName ( Model $ model , $ id = null ) { if ( empty ( $ id ) || empty ( $ model -> displayField ) ) { return false ; } if ( is_array ( $ id ) ) { if ( ! isset ( $ id [ $ model -> alias ] [ $ model -> displayField ] ) ) { return false ; } $ result = $ id [ $ model -> alias ] [ $ model -> displayField ] ; } else { $ model -> id = $ id ; $ result = $ model -> field ( $ model -> displayField ) ; } return $ result ; }
Return name of data.

@param Model $model Model using this behavior.
@param int|string|array $id ID of record or array data
for retrieving name.
@return string|bool Return name of data,
or False on failure.
Return name of data .