X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FPdfFormat.php;h=96a0f3ae2157064b70dc1484b0d91662ecc84b76;hb=51daafaadd025703b2f8d6e3d27898e3768908f9;hp=d57ac700455f61f9c7b4ab9d53ffba746aab51bb;hpb=6628866da4eb17b8ff190928d8afdbee11526ae6;p=civicrm-core.git diff --git a/CRM/Core/BAO/PdfFormat.php b/CRM/Core/BAO/PdfFormat.php index d57ac70045..96a0f3ae21 100644 --- a/CRM/Core/BAO/PdfFormat.php +++ b/CRM/Core/BAO/PdfFormat.php @@ -53,6 +53,11 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue { 'type' => CRM_Utils_Type::T_STRING, 'default' => 'letter', ), + 'stationery' => array( + 'name' => 'stationery', + 'type' =>CRM_Utils_Type::T_STRING, + 'default' => '', + ), 'orientation' => array( 'name' => 'orientation', 'type' => CRM_Utils_Type::T_STRING, @@ -256,10 +261,12 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue { /** * Get PDF Page Format field from associative array * - * @param string $field name of a PDF Page Format field - * @param array (reference) $values associative array of name/value pairs containing + * @param string $field name of a PDF Page Format field + * @param array (reference) $values associative array of name/value pairs containing * PDF Page Format field selections * + * @param null $default + * * @return value * @access public * @static @@ -361,7 +368,7 @@ class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue { // serialize PDF Page Format fields into a single string to store in the 'value' column of the Option Value table $v = json_decode($this->value, TRUE); foreach (self::$optionValueFields as $name => $field) { - $v[$name] = self::getValue($name, $values, $v[$name]); + $v[$name] = self::getValue($name, $values, CRM_Utils_Array::value($name, $v)); } $this->value = json_encode($v);