public function fieldValue(EntityInterface $data, $field)
    {
        if (empty($data)) {
            $data = $this->getContext();
        }

        return $data->get($field);
    }
public function fieldValue(EntityInterface $data, $field)
    {
        if (empty($data)) {
            $data = $this->getContext();
        }

        return $data->get($field);
    }
public function fieldValue ( EntityInterface $ data , $ field ) { if ( empty ( $ data ) ) { $ data = $ this -> getContext ( ) ; } return $ data -> get ( $ field ) ; }
Get the current field value

@param \Cake\Datasource\EntityInterface $data The entity data.
@param string $field The field to extract, if null, the field from the entity context is used.
@return mixed
Get the current field value