コード例 #1
0
/**
 *  Add an Website for a contact
 *
 * Allowed @params array keys are:
 * {@getfields website_create}
 * @example WebsiteCreate.php
 * {@example WebsiteCreate.php}
 *
 * @return array of newly created website property values.
 * @access public
 * @todo convert to using basic create - BAO function non-std
 */
function civicrm_api3_website_create($params)
{
    $websiteBAO = CRM_Core_BAO_Website::add($params);
    $values = array();
    _civicrm_api3_object_to_array($websiteBAO, $values[$websiteBAO->id]);
    return civicrm_api3_create_success($values, $params, 'website', 'get');
}
コード例 #2
0
ファイル: Website.php プロジェクト: kidaa30/yes
/**
 * Add an Website for a contact.
 *
 * @param array $params
 *
 * @return array
 *   API result array.
 * @todo convert to using basic create - BAO function non-std
 */
function civicrm_api3_website_create($params)
{
    //DO NOT USE THIS FUNCTION AS THE BASIS FOR A NEW API http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
    $websiteBAO = CRM_Core_BAO_Website::add($params);
    $values = array();
    _civicrm_api3_object_to_array($websiteBAO, $values[$websiteBAO->id]);
    return civicrm_api3_create_success($values, $params, 'Website', 'get');
}