X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FMapping.php;h=ccd258031ee9b2bcb1076efeb68e346b5bbb27ba;hb=9bd51e848bde8221f6d8f22eab8c913fc6b7e3a9;hp=b66e2fac147ea637a0ca54f4ea7233e9ff9845ce;hpb=f612371d7083c7835021b8992ce12b5ff01217a9;p=civicrm-core.git diff --git a/api/v3/Mapping.php b/api/v3/Mapping.php index b66e2fac14..ccd258031e 100644 --- a/api/v3/Mapping.php +++ b/api/v3/Mapping.php @@ -4,7 +4,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2016 | + | Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -43,6 +43,18 @@ function civicrm_api3_mapping_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } +/** + * Adjust Metadata for Create action. + * + * The metadata is used for setting defaults, documentation & validation. + * + * @param array $spec + * Array of parameters determined by getfields. + */ +function _civicrm_api3_mapping_create_spec(&$spec) { + $spec['name']['api.required'] = 1; +} + /** * Deletes an existing Mapping. *