Changed placement of hook to be able to access variables better
authorMaggie <maggie.epps@gmail.com>
Mon, 5 May 2014 17:00:17 +0000 (13:00 -0400)
committerMaggie <maggie.epps@gmail.com>
Mon, 5 May 2014 19:27:28 +0000 (15:27 -0400)
CRM/Badge/BAO/Badge.php

index 4c38a0d4896bf9330ff6116cd42d68157b1f882c..cc6c42edff84813b528cf894e8b845a7ea0a3ef3 100644 (file)
@@ -153,8 +153,6 @@ class CRM_Badge_BAO_Badge {
   }
 
   public function labelCreator(&$formattedRow, $cellspacing = 0) {
-    //call hook alterBadge
-    CRM_Utils_Hook::alterBadge($formattedRow['labelFormat'], $this, $formattedRow,$formattedRow['values']);
 
     $this->lMarginLogo = 18;
     $this->tMarginName = 20;
@@ -162,6 +160,9 @@ class CRM_Badge_BAO_Badge {
     $x = $this->pdf->GetAbsX();
     $y = $this->pdf->getY();
 
+    //call hook alterBadge
+    CRM_Utils_Hook::alterBadge($formattedRow['labelFormat'], $this, $formattedRow,$formattedRow['values']);
+
     $startOffset = 0;
     if (!empty($formattedRow['image_1'])) {
       $this->printImage($formattedRow['image_1'], NULL, NULL, CRM_Utils_Array::value('width_image_1', $formattedRow),