Bundle/BusinessEntityBundle/Entity/Traits/BusinessEntityTrait.php
public function getEntityAttributeValue($field)
    {
        if ($field) {
            $functionName = 'get'.ucfirst($field);

            // Avoid error when the widget refer to a property that has been removed
            if (!method_exists($this, $functionName)) {
                return;
            }

            $fieldValue = $this->{$functionName}();
        } else {
            $fieldValue = null;
        }

        return $fieldValue;
    }
public function getEntityAttributeValue($field)
    {
        if ($field) {
            $functionName = 'get'.ucfirst($field);

            // Avoid error when the widget refer to a property that has been removed
            if (!method_exists($this, $functionName)) {
                return;
            }

            $fieldValue = $this->{$functionName}();
        } else {
            $fieldValue = null;
        }

        return $fieldValue;
    }
public function getEntityAttributeValue ( $ field ) { if ( $ field ) { $ functionName = 'get' . ucfirst ( $ field ) ; // Avoid error when the widget refer to a property that has been removed if ( ! method_exists ( $ this , $ functionName ) ) { return ; } $ fieldValue = $ this -> { $ functionName } ( ) ; } else { $ fieldValue = null ; } return $ fieldValue ; }
Get the content of an attribute of the current entity.

@param string $field

@return mixed
Get the content of an attribute of the current entity .