3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
13 * @package CiviCRM_APIv3
17 * Provide meta-data for this api.
19 * @param array $params
21 function _civicrm_api3_generic_validate_spec(&$params) {
22 $params['action']['api.required'] = TRUE;
23 $params['action']['title'] = ts('API Action');
27 * Generic api wrapper used for validation of entity-action pair.
29 * @param array $apiRequest
33 function civicrm_api3_generic_validate($apiRequest) {
34 $errors = _civicrm_api3_validate($apiRequest['entity'], $apiRequest['params']['action'], $apiRequest['params']);
36 return civicrm_api3_create_success($errors, $apiRequest['params'], $apiRequest['entity'], 'validate');