Skip to content
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

[REF] Update Contact email form to use the trait for EmailCommon functions #17031

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Apr 8, 2020

Overview

[REF] Update Contact email form to use the trait for EmailCommon functions

Before

CRM_Contact_Form_Task_Email does not share trait preProcess code

After

Code from trait used by CRM_Contact_Form_Task_Email where they overlap

Specifically the goal is to move interaction with CRM_Contact_Form_Task_EmailCommon to the trait class (and then to copy it directly onto the trait class & deprecate CRM_Contact_Form_Task_EmailCommon to the extent possible with an aim to eventual removal

Technical Details

  • I had to rename the existing preProcess function so it could be called from both
  • I dug into $this->assign('isAdmin', 1); and it affects the help message. It seems to be only on the contact form task by omission rather than design
  • the reason CRM_Contact_Form_Task_Email only calls it's parent sometimes is obscure but this maintains tha.

Comments

@civibot
Copy link

civibot bot commented Apr 8, 2020

(Standard links)

@civibot civibot bot added the master label Apr 8, 2020
@colemanw
Copy link
Member

colemanw commented Apr 8, 2020

Refactor looks good.

@colemanw colemanw merged commit cb66ac5 into civicrm:master Apr 8, 2020
@colemanw colemanw deleted the email4 branch April 8, 2020 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants