Closed (fixed)
Project:
Drupal.org username field
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2019 at 08:26 UTC
Updated:
9 Jun 2020 at 23:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hussainwebComment #3
hussainwebReference documentation: https://www.drupal.org/docs/8/api/entity-api/dynamicvirtual-field-values...
Comment #4
yonas.legesse commentedMore clarification as to which fields need to be included. The current response includes more than 40 field elements.
Comment #5
yonas.legesse commentedI've included starter computed fields assuming the service patch submitted in #3077598 is okay to continue with.
Comment #6
yonas.legesse commented@hussainweb, i have incorporated the changes made in issue #3077598. This is meant to serve as a starter. Upon review, indicate what is exactly expected as well. P.S I've altered t() calls to $this->t().
Comment #7
hussainwebSome comments. Also, I committed #3077598: Add a service to get user information from d.o with a different method name, so that needs to be changed as well.
Let's add at least these fields:
- Bio
- IRC Nick
- Websites
- Country
- Languages
- First Name
- Last Name
- URL
- Created
We can even do some of these in other issues. For example, "Industries" requires another API request, so it might make sense to do that in a different issue.
`break` is not required here. Nor in the next `case`.
Comment #8
hussainwebAlso, let's not worry about the formatters here. I don't think we'll add those formatters at all. The computed fields are meant to be used with modules like views.
Comment #9
yonas.legesse commentedI've added the suggested fields and changed t() calls to $this->t().
Comment #10
hussainwebThanks again for all the work. I have a few more comments.
What is `$this->service`? Also, let's give a better name. How about something like `doUserService`?
I am thinking lets just return the timestamp or something machine-readable like `date('c', ...)`
I'd rather do this in a separate issue.
Comment #11
yonas.legesse commentedI've addressed the comments. However, need some clarification for 1 : "What is `$this->service`? " I've changed the name as per your suggestion but somehow feel there's more. Please clarify if the current patch has missed anything.
Comment #13
hussainwebLGTM. Let's add tests in a follow-up (#3143091: Add tests for computed fields).