From b5652c8c7d7d2e39d5166dcc4f32e2723e7210ac Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sat, 3 Dec 2022 14:40:39 +1300 Subject: [PATCH] Remove unused, deprecated class --- CRM/Activity/Form/Task/PDFLetterCommon.php | 84 ---------------------- 1 file changed, 84 deletions(-) delete mode 100644 CRM/Activity/Form/Task/PDFLetterCommon.php diff --git a/CRM/Activity/Form/Task/PDFLetterCommon.php b/CRM/Activity/Form/Task/PDFLetterCommon.php deleted file mode 100644 index 271211731fc2..000000000000 --- a/CRM/Activity/Form/Task/PDFLetterCommon.php +++ /dev/null @@ -1,84 +0,0 @@ -_activityHolderIds; - $formValues = $form->controller->exportValues($form->getName()); - $html_message = CRM_Core_Form_Task_PDFLetterCommon::processTemplate($formValues); - - // Do the rest in another function to make testing easier - $form->createDocument($activityIds, $html_message, $formValues); - - $form->postProcessHook(); - - CRM_Utils_System::civiExit(1); - } - - /** - * Produce the document from the activities - * This uses the new token processor - * - * @param array $activityIds array of activity ids - * @param string $html_message message text with tokens - * @param array $formValues formValues from the form - * - * @deprecated - * - * @return string - */ - public static function createDocument($activityIds, $html_message, $formValues) { - CRM_Core_Error::deprecatedFunctionWarning('no alternative'); - $tp = self::createTokenProcessor(); - $tp->addMessage('body_html', $html_message, 'text/html'); - - foreach ($activityIds as $activityId) { - $tp->addRow()->context('activityId', $activityId); - } - $tp->evaluate(); - - return self::renderFromRows($tp->getRows(), 'body_html', $formValues); - } - - /** - * Create a token processor - * - * @deprecated - * - * @return \Civi\Token\TokenProcessor - */ - public static function createTokenProcessor() { - CRM_Core_Error::deprecatedFunctionWarning('no alternative'); - return new TokenProcessor(\Civi::dispatcher(), [ - 'controller' => get_class(), - 'smarty' => FALSE, - 'schema' => ['activityId'], - ]); - } - -}