$formattedRow['labelTitle'] = $layout['title'];
$formattedRow['labelId'] = $layout['id'];
-
if (!empty($layout['data']['rowElements'])) {
foreach ($layout['data']['rowElements'] as $key => $element) {
$value = '';
case 'Hanging Badge 3-3/4" x 4-3"/4':
self::labelCreator($formattedRow, 5);
break;
+
case 'Avery 5395':
default:
self::labelCreator($formattedRow);
case 'R':
$imageAlign = 68;
break;
+
case 'L':
$imageAlign = 0;
break;
+
default:
break;
}
case 'L':
$xAlign += -14;
break;
+
case 'R':
$xAlign += 27;
break;
+
case 'C':
$xAlign += 9;
break;
case 'L':
$xAlign += -5;
break;
+
case 'R':
$xAlign += 56;
break;
+
case 'C':
$xAlign += 29;
break;
}
$style = array(
- 'border' => false,
+ 'border' => FALSE,
'hpadding' => 13.5,
'vpadding' => 'auto',
- 'fgcolor' => array(0,0,0),
- 'bgcolor' => false,
+ 'fgcolor' => array(0, 0, 0),
+ 'bgcolor' => FALSE,
'position' => '',
);
- $this->pdf->write2DBarcode($data['current_value'], 'QRCODE,H', $xAlign, $y + $this->pdf->height - 26, 30,
+ $this->pdf->write2DBarcode($data['current_value'], 'QRCODE,H', $xAlign, $y + $this->pdf->height - 26, 30,
30, $style, 'B');
}
}
CRM_Badge_BAO_Layout::retrieve($layoutParams, $layoutInfo);
$formatProperties = CRM_Core_OptionGroup::getValue('name_badge', $layoutInfo['label_format_name'], 'name');
- $layoutInfo['format'] = json_decode($formatProperties, true);
+ $layoutInfo['format'] = json_decode($formatProperties, TRUE);
$layoutInfo['data'] = CRM_Badge_BAO_Layout::getDecodedData($layoutInfo['data']);
return $layoutInfo;
}
* @static
*/
static public function getDecodedData($jsonData) {
- return json_decode($jsonData, true);
+ return json_decode($jsonData, TRUE);
}
}
$this->applyFilter('__ALL__', 'trim');
- $this->add('text', 'title', ts('Title'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_PrintLabel', 'title'), true);
+ $this->add('text', 'title', ts('Title'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_PrintLabel', 'title'), TRUE);
$labelStyle = CRM_Core_BAO_LabelFormat::getList(TRUE, 'name_badge');
$this->add('select', 'label_format_name', ts('Label Format'), array('' => ts('- select -')) + $labelStyle, TRUE);
unset($imageAlignment['C']);
$rowCount = self::FIELD_ROWCOUNT;
- for ( $i =1; $i <= $rowCount; $i++ ) {
+ for ( $i = 1; $i <= $rowCount; $i++ ) {
$this->add('select', "token[$i]", ts('Token'), array('' => ts('- skip -')) + $tokens);
$this->add('select', "font_name[$i]", ts('Font Name'), $fontNames);
$this->add('select', "font_size[$i]", ts('Font Size'), $fontSizes);
$this->add('select', "barcode_type", ts('Type'), $barcodeTypes);
$this->add('select', "barcode_alignment", ts('Alignment'), $textAlignment);
-
- $attributes = array('readonly'=> true);
+ $attributes = array('readonly' => TRUE);
$this->add('text', 'image_1', ts('Image (top left)'),
$attributes + CRM_Core_DAO::getAttribute('CRM_Core_DAO_PrintLabel', 'title'));
$this->add('text', 'width_image_1', ts('Width (mm)'), array('size' => 6));
$this->add('text', 'width_image_2', ts('Width (mm)'), array('size' => 6));
$this->add('text', 'height_image_2', ts('Height (mm)'), array('size' => 6));
-
$this->add('checkbox', 'show_participant_image', ts('Use Participant Image?'));
$this->add('text', 'width_participant_image', ts('Width (mm)'), array('size' => 6));
$this->add('text', 'height_participant_image', ts('Height (mm)'), array('size' => 6));