* @param array $params
*/
function _civicrm_api3_navigation_create_spec(&$params) {
- $params['name']['api.required'] = 1;
+ $params['domain_id']['api.default'] = CRM_Core_Config::domainID();
+ $params['domain_id']['type'] = CRM_Utils_Type::T_INT;
+ $params['domain_id']['title'] = 'Domain ID';
}
/**
* API result array.
*/
function civicrm_api3_navigation_create($params) {
+ civicrm_api3_verify_one_mandatory($params, NULL, array('name', 'label'));
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
);
$this->footer = civicrm_api3('MailingComponent', 'create', array(
+ 'name' => 'test domain footer',
+ 'component_type' => 'footer',
'body_html' => '<p>From {domain.address}. To opt out, go to {action.optOutUrl}.</p>',
'body_text' => 'From {domain.address}. To opt out, go to {action.optOutUrl}.',
));
* Test create function.
*/
public function testCreate() {
- $params = array('name' => 'feed', 'label' => 'Feed the Goats', 'domain_id' => 1);
+ $params = array('label' => 'Feed the Goats', 'domain_id' => 1);
$result = $this->callAPISuccess($this->_entity, 'create', $params);
$this->getAndCheck($params, $result['id'], $this->_entity, TRUE);
}