+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
* $Id: $
*
*/
* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return Object
- * DAO object on success, null otherwise
- *
+ * @return bool
+ * true if we found and updated the object, else false
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Job', $id, 'is_active', $is_active);
* Make a copy of a Job.
*
* @param int $id The job id to copy.
- *
+ * @param array $params
* @return CRM_Core_DAO
*/
- public static function copy($id, $params = array()) {
- $fieldsFix = array(
- 'suffix' => array(
+ public static function copy($id, $params = []) {
+ $fieldsFix = [
+ 'suffix' => [
'name' => ' - ' . ts('Copy'),
- ),
+ ],
'replace' => $params,
- );
- $copy = &CRM_Core_DAO::copyGeneric('CRM_Core_DAO_Job', array('id' => $id), NULL, $fieldsFix);
+ ];
+ $copy = &CRM_Core_DAO::copyGeneric('CRM_Core_DAO_Job', ['id' => $id], NULL, $fieldsFix);
$copy->save();
CRM_Utils_Hook::copy('Job', $copy);