-
-
Notifications
You must be signed in to change notification settings - Fork 825
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] dev/core#2790 move buildForm to pdfTrait #21297
Conversation
(Standard links)
|
@@ -21,6 +21,8 @@ | |||
*/ | |||
class CRM_Member_Form_Task_PDFLetter extends CRM_Member_Form_Task { | |||
|
|||
use CRM_Contact_Form_Task_PDFTrait; |
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.
The others already have this trait
@eileenmcnaughton see style check |
This moves the buildForm function over the pdfTrait I note that some of the functions have I wonder if they all should - I suspect so
3124601
to
053c1a4
Compare
thanks @colemanw - fixed |
@demeritcowboy this will make the activity one go stale again :-( - but whichever order they are merged in I'll just rebase |
I can take a look at this today. |
thanks @demeritcowboy |
Looks good.
I'm not sure what this is referring to (maybe |
* @var CRM_Core_Form $form | ||
* @throws \CRM_Core_Exception | ||
*/ | ||
public static function buildQuickForm(&$form) { | ||
CRM_Core_Error::deprecatedFunctionWarning('no supported alternative for non-core code'); |
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.
Oops I merged a little too soon. The thank-you letters hit this.
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.
opps - well we can fix that
@@ -82,7 +84,7 @@ public function buildQuickForm() { | |||
|
|||
// Contribute PDF tasks allow you to email as well, so we need to add email address to those forms | |||
$this->add('select', 'from_email_address', ts('From Email Address'), $this->_fromEmails, TRUE); | |||
CRM_Core_Form_Task_PDFLetterCommon::buildQuickForm($this); | |||
$this->addPDFElementsToForm(); |
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.
Line 83: CRM_Contact_Form_Task_PDFLetterCommon::buildQuickForm does exactly the same thing as line 85 CRM_Core_Form_Task_PDFLetterCommon::buildQuickForm(), so that's why it gives the deprecation notice.
Overview
[REF] dev/core#2790 move buildForm to pdfTrait
Before
Function is on static class that is under deprecation
After
Function moved to a trait
Technical Details
This moves the buildForm function over the pdfTrait
I note that some of the functions have
I wonder if they all should - I suspect so
Comments