function _civicrm_api3_cxn_register_spec(&$spec) {
$daoFields = CRM_Cxn_DAO_Cxn::fields();
$spec['app_guid'] = $daoFields['app_guid'];
function _civicrm_api3_cxn_register_spec(&$spec) {
$daoFields = CRM_Cxn_DAO_Cxn::fields();
$spec['app_guid'] = $daoFields['app_guid'];
'name' => 'app_meta_url',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Application Metadata URL'),
'description' => 'Application Metadata URL',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
'name' => 'app_meta_url',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Application Metadata URL'),
'description' => 'Application Metadata URL',
'maxlength' => 255,
'size' => CRM_Utils_Type::HUGE,
$daoFields = CRM_Cxn_DAO_Cxn::fields();
$spec['cxn_guid'] = $daoFields['cxn_guid'];
$spec['app_guid'] = $daoFields['app_guid'];
$daoFields = CRM_Cxn_DAO_Cxn::fields();
$spec['cxn_guid'] = $daoFields['cxn_guid'];
$spec['app_guid'] = $daoFields['app_guid'];
'name' => 'force',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Force'),
'description' => 'Destroy connection even if the remote application is non-responsive.',
'default' => '0',
'name' => 'force',
'type' => CRM_Utils_Type::T_BOOLEAN,
'title' => ts('Force'),
'description' => 'Destroy connection even if the remote application is non-responsive.',
'default' => '0',
- $cxnId = CRM_Core_DAO::singleValueQuery('SELECT cxn_guid FROM civicrm_cxn WHERE app_guid = %1', array(
- 1 => array($params['app_guid'], 'String'),
- ));
+ $cxnId = CRM_Core_DAO::singleValueQuery('SELECT cxn_guid FROM civicrm_cxn WHERE app_guid = %1', [
+ 1 => [$params['app_guid'], 'String'],
+ ]);
$daoFields = CRM_Cxn_DAO_Cxn::fields();
$spec['app_guid'] = $daoFields['app_guid'];
$spec['cxn_guid'] = $daoFields['cxn_guid'];
$daoFields = CRM_Cxn_DAO_Cxn::fields();
$spec['app_guid'] = $daoFields['app_guid'];
$spec['cxn_guid'] = $daoFields['cxn_guid'];
'name' => 'page_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Page Type'),
'description' => 'The type of page (eg "settings")',
'maxlength' => 63,
'size' => CRM_Utils_Type::HUGE,
'name' => 'page_name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('Page Type'),
'description' => 'The type of page (eg "settings")',
'maxlength' => 63,
'size' => CRM_Utils_Type::HUGE,
- return $client->call($appMeta, 'Cxn', 'getlink', array(
+ return $client->call($appMeta, 'Cxn', 'getlink', [
'CIVICRM_CXN_CA' => defined('CIVICRM_CXN_CA') ? CIVICRM_CXN_CA : NULL,
'CIVICRM_CXN_VIA' => defined('CIVICRM_CXN_VIA') ? CIVICRM_CXN_VIA : NULL,
'CIVICRM_CXN_APPS_URL' => defined('CIVICRM_CXN_APPS_URL') ? CIVICRM_CXN_APPS_URL : NULL,
'siteCallbackUrl' => CRM_Cxn_BAO_Cxn::getSiteCallbackUrl(),
'CIVICRM_CXN_CA' => defined('CIVICRM_CXN_CA') ? CIVICRM_CXN_CA : NULL,
'CIVICRM_CXN_VIA' => defined('CIVICRM_CXN_VIA') ? CIVICRM_CXN_VIA : NULL,
'CIVICRM_CXN_APPS_URL' => defined('CIVICRM_CXN_APPS_URL') ? CIVICRM_CXN_APPS_URL : NULL,
'siteCallbackUrl' => CRM_Cxn_BAO_Cxn::getSiteCallbackUrl(),
return civicrm_api3_create_success($result, $params, 'Cxn', 'create');
}
return civicrm_api3_create_success($result, $params, 'Cxn', 'create');
}