Closed (fixed)
Project:
Alexander's Printing API
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
17 Jan 2019 at 22:10 UTC
Updated:
1 Feb 2019 at 17:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gmem commentedPretty hefty patch with first version of entities, I realize there is some "don't reinvent the wheel" going on here but I want to be truly free of Commerce and the API requires all fields.
Comment #3
gmem commentedComment #4
gmem commentedSome more progress, moving hooks to submodule and translate to Alexanders entities
Comment #5
gmem commentedWow, this is a big patch, but I think I've eliminated most of the reliance on Drupal Commerce
Comment #6
joshmillerThis field should be prefixed with the
alxdr_field prefix I've mentioned elsewhere. And remove thefield_prefix altogether.These need to be deleted or updated. But it's against code standards to have code commented out.
You're hard coding the rush value?
We really don't ever want to increase the scope of any of the permissions that come with Drupal. Please create custom permissions for all routes.
Better description: "Send Alexanders orders that contain these types of products."
If we go with
alxdr_for a field prefix, then this field name should bealxdr_send.Deleting fields is pretty terrible action to just casually do. I'd recommend instead of a normal form, we use a confirmation form.
Note that #3026635: ApiController.php Nitpicks addresses some issues in this file.
We need views integration for these entities. To provide views data for an entity create a class implementing \Drupal\views\EntityViewsDataInterface and reference this in the "views" annotation in the entity class. The return value of the getViewsData() method on the interface is the same as the old hook_views_data() hook.
Also, we need to ship with admin/content view of Alexanders Orders that provides search/filter/edit/delete functionality. The commerce version should provide a views reference that brings in all the related Alexanders information.
Missing an entire entity for this. Though, I'd like to point out we don't have to ship this module with any photobook capabilities initially.
Comment is a copy paste typo.
You're missing this list classes
Field names are not namespaced in a way that is easy (unless base fields are simply columns on the main entity data table, but I don't think so). You must prefix all fields with something short. Maybe
alxdr_An additional feature we need (can be a separate issue) is the ability to override these urls by uploading a file. Might make sense to add the override files here as a simple file field and handle the overriding in the API class.
Location of foil file? Otherwise it reads like we're talking about a physical location.
What is this class? Photobook? Should it be more generic, like Alexanders Order Item with File?
Make sure you add address module to dependencies if it isn't there.
You need to run phpcs --standard=Drupal on all these things to make sure you're passing code standards. For example, all of these functions are missing comments.
Comment #7
gmem commentedAddresses code standards
Comment #8
gmem commentedAdded missing files
Comment #9
joshmillerPlease post interdiffs. I'd rather not review 40kb everytime you post something :)
https://www.drupal.org/documentation/git/interdiff
Comment #10
gmem commentedHow would we feel about splitting the views stuff into a separate issue? As it stands now this patch is pretty big , so I'd rather commit what's here now and move the other stuff to issues.
Comment #11
gmem commentedInterdiff I missed on #9 :)
Comment #12
joshmillerComment #13
joshmillerPretty sure these fields are wrong.
Comment #15
gmem commented*wipes brow* Whew