Пример #1
0
 /**
  * returns the list of fields that can be exported
  *
  * @access public
  * return array
  */
 function &export($prefix = false)
 {
     if (!$GLOBALS['_CRM_MAILING_EVENT_DAO_SUBSCRIBE']['_export']) {
         $GLOBALS['_CRM_MAILING_EVENT_DAO_SUBSCRIBE']['_export'] = array();
         $fields =& CRM_Mailing_Event_DAO_Subscribe::fields();
         foreach ($fields as $name => $field) {
             if (CRM_Utils_Array::value('export', $field)) {
                 if ($prefix) {
                     $GLOBALS['_CRM_MAILING_EVENT_DAO_SUBSCRIBE']['_export']['mailing_event_subscribe'] =& $fields[$name];
                 } else {
                     $GLOBALS['_CRM_MAILING_EVENT_DAO_SUBSCRIBE']['_export'][$name] =& $fields[$name];
                 }
             }
         }
     }
     return $GLOBALS['_CRM_MAILING_EVENT_DAO_SUBSCRIBE']['_export'];
 }