protected function getFieldItemAccessor(Field $field)
    {
        if ($field->hasForeignRelation()) {
            $relation = $field->getForeignRelation();
            return sprintf('$%s->%s', $relation->getSingleName(), $relation->getField());
        }

        return '$text';
    }