当前位置: 首页>>代码示例>>PHP>>正文


PHP CRM_Contact_DAO_RelationshipType::fields方法代码示例

本文整理汇总了PHP中CRM_Contact_DAO_RelationshipType::fields方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Contact_DAO_RelationshipType::fields方法的具体用法?PHP CRM_Contact_DAO_RelationshipType::fields怎么用?PHP CRM_Contact_DAO_RelationshipType::fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRM_Contact_DAO_RelationshipType的用法示例。


在下文中一共展示了CRM_Contact_DAO_RelationshipType::fields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: civicrm_relationship_types_get

/**
 * Function to get all relationship type
 * retruns  An array of Relationship_type
 * * @access  public
 */
function civicrm_relationship_types_get($params = null)
{
    _civicrm_initialize();
    require_once 'CRM/Contact/DAO/RelationshipType.php';
    $relationshipTypes = array();
    $relationshipType = array();
    $relationType = new CRM_Contact_DAO_RelationshipType();
    if (!empty($params) && is_array($params)) {
        $properties = array_keys($relationType->fields());
        foreach ($properties as $name) {
            if (array_key_exists($name, $params)) {
                $relationType->{$name} = $params[$name];
            }
        }
    }
    $relationType->find();
    while ($relationType->fetch()) {
        _civicrm_object_to_array(clone $relationType, $relationshipType);
        $relationshipTypes[] = $relationshipType;
    }
    return $relationshipTypes;
}
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:27,代码来源:RelationshipType.php

示例2: array

 /**
  * returns the list of fields that can be exported
  *
  * @access public
  * return array
  */
 function &export($prefix = false)
 {
     if (!$GLOBALS['_CRM_CONTACT_DAO_RELATIONSHIPTYPE']['_export']) {
         $GLOBALS['_CRM_CONTACT_DAO_RELATIONSHIPTYPE']['_export'] = array();
         $fields =& CRM_Contact_DAO_RelationshipType::fields();
         foreach ($fields as $name => $field) {
             if (CRM_Utils_Array::value('export', $field)) {
                 if ($prefix) {
                     $GLOBALS['_CRM_CONTACT_DAO_RELATIONSHIPTYPE']['_export']['relationship_type'] =& $fields[$name];
                 } else {
                     $GLOBALS['_CRM_CONTACT_DAO_RELATIONSHIPTYPE']['_export'][$name] =& $fields[$name];
                 }
             }
         }
     }
     return $GLOBALS['_CRM_CONTACT_DAO_RELATIONSHIPTYPE']['_export'];
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:23,代码来源:RelationshipType.php


注:本文中的CRM_Contact_DAO_RelationshipType::fields方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。