+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id: $
*
*/
}
/**
- * Build the form object
+ * Build the form object.
*
* @param bool $check
*
$attributes['name'], TRUE
);
- $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array('CRM_Core_DAO_Job', $this->_id));
+ $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array(
+ 'CRM_Core_DAO_Job',
+ $this->_id,
+ ));
$this->add('text', 'description', ts('Description'),
$attributes['description']
$apiRequest = \Civi\API\Request::create($fields['api_entity'], $fields['api_action'], array('version' => 3), NULL);
try {
$apiKernel->resolve($apiRequest);
- } catch (\Civi\API\Exception\NotImplementedException $e) {
+ }
+ catch (\Civi\API\Exception\NotImplementedException $e) {
$errors['api_action'] = ts('Given API command is not defined.');
}
}
$domainID = CRM_Core_Config::domainID();
- $dao = new CRM_Core_DAO_Job();
- $dao->id = $this->_id;
+ $dao = new CRM_Core_DAO_Job();
+ $dao->id = $this->_id;
$dao->domain_id = $domainID;
if (!$dao->find(TRUE)) {
return $defaults;
}
/**
- * Process the form submission
+ * Process the form submission.
*
*
* @return void
$dao = new CRM_Core_DAO_Job();
- $dao->id = $this->_id;
- $dao->domain_id = $domainID;
+ $dao->id = $this->_id;
+ $dao->domain_id = $domainID;
$dao->run_frequency = $values['run_frequency'];
- $dao->parameters = $values['parameters'];
- $dao->name = $values['name'];
- $dao->api_entity = $values['api_entity'];
- $dao->api_action = $values['api_action'];
- $dao->description = $values['description'];
- $dao->is_active = CRM_Utils_Array::value('is_active', $values, 0);
+ $dao->parameters = $values['parameters'];
+ $dao->name = $values['name'];
+ $dao->api_entity = $values['api_entity'];
+ $dao->api_action = $values['api_action'];
+ $dao->description = $values['description'];
+ $dao->is_active = CRM_Utils_Array::value('is_active', $values, 0);
$dao->save();
CRM_Core_Session::setStatus($msg, ts('Warning: Update Greeting job enabled'), 'alert');
}
-
}
-}
+}