-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDST-554: New roles added to Creator vs Contributor mapping #16
Conversation
|
||
// Add the resolved image URL to the elements array. | ||
$this->elements[$dest][] = $resolved_image_url; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this was already setting a thumbnail?
... but it's doing an up-front lookup just to use the deferred thing? Should probably drop the up-front lookup to just always do the deferred thing?
Kinda want to suggest making use of the URL generator plugins, instead of directly using the underlying route.
$url = $this->urlGenerator->generateFromRoute('dgi_image_discovery.deferred_resolution', [ | ||
'node' => $node_id, | ||
'style' => $style_id, | ||
], ['absolute' => TRUE]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the intended URL Generator plugin (is this service even plugin based? Dunno)? Like, was meaning the plugins for the image discovery, in https://github.com/discoverygarden/dgi_image_discovery/tree/main/src/Plugin/dgi_image_discovery/url_generator
... so, using the related plugin manager and getting an instance of the desired plugin. Not sure if it's necessary here to make it fully configurable, but could? Not much configuration on either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adam-vessey I made code changes, please review.
@@ -389,11 +402,23 @@ public function addThumbnail(ContentEntityInterface $entity, $dest) { | |||
$event = $this->imageDiscovery->getImage($entity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still doing an unnecessary lookup. Why bother keeping this if doing the deferred resolution, which expects to handle the lookup separately?
Also, the latest commit introduced a number of coding standards issues:
|
No description provided.