コード例 #1
0
ファイル: PrintLabel.php プロジェクト: kidaa30/yes
 /**
  * Returns the list of fields that can be exported
  *
  * @param bool $prefix
  *
  * @return array
  */
 static function &export($prefix = false)
 {
     if (!self::$_export) {
         self::$_export = array();
         $fields = self::fields();
         foreach ($fields as $name => $field) {
             if (CRM_Utils_Array::value('export', $field)) {
                 if ($prefix) {
                     self::$_export['print_label'] =& $fields[$name];
                 } else {
                     self::$_export[$name] =& $fields[$name];
                 }
             }
         }
     }
     return self::$_export;
 }
コード例 #2
0
 /**
  *  get the list of print labels.
  *
  * @return array
  *   list of labels
  */
 public static function getList()
 {
     $printLabel = new CRM_Core_DAO_PrintLabel();
     $printLabel->find();
     $labels = array();
     while ($printLabel->fetch()) {
         $labels[$printLabel->id] = $printLabel->title;
     }
     return $labels;
 }