This repository was archived by the owner on Oct 29, 2020. It is now read-only.
Update to include affiliates info in Campaign class build.#6395
Merged
Conversation
|
|
||
| if ($logo) { | ||
| $partner['media'] = [ | ||
| 'uri' => image_style_url('wmax-423px', $logo['uri']), |
Contributor
There was a problem hiding this comment.
I don't think we enforce minimums on partner logos, so I have a feeling this might be a little large
Contributor
Author
There was a problem hiding this comment.
Yeah, but it's already what we use in the web app. On the DS we use CSS to help us tame the size of partner logos. I referenced the image "style" used in the ds_taxonomy module.
Contributor
|
Code looks good to me -- I think a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's this PR do?
This PR include a Campaign's affiliates information (such as partners in this particular case) to the
Campaignclass build function when a newCampaignis instantiated and also exposes this data to the API.Example output:

How should this be manually tested?
Load a few campaigns both with and without partners (and partners that are also sponsors) via the API and see if the affiliate property on the response object is appropriately filled out.
Any background context you want to provide?
If a partner does not have a logo "media" available, instead of making the
uriandtypebeNULLI decided to make the entiremediaobjectNULL. Just seemed to make more sense to me that when planning on outputting the path to the logo, better to check themediaobject if that's something valid first. But we can nerd 🤓 battle over this if others feel strongly with a different opinion!Also, since this is on the
Campaignclass object, the partner information is now nicely formatted and available for use in future Campaign template updates via the web interface as well, wink wink 😉What are the relevant tickets?
Fixes #6393
@aaronschachter @angaither @chloealee
cc: @mikefantini