+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
public $onEnd;
public $onEndUrl;
public $pathPrefix;
- // queue-runner id; used for persistence
+ /**
+ * queue-runner id; used for persistence
+ * @var int
+ */
public $qrid;
/**
$this->onEnd = CRM_Utils_Array::value('onEnd', $runnerSpec, NULL);
$this->onEndUrl = CRM_Utils_Array::value('onEndUrl', $runnerSpec, NULL);
$this->pathPrefix = CRM_Utils_Array::value('pathPrefix', $runnerSpec, 'civicrm/queue');
- $this->buttons = CRM_Utils_Array::value('buttons', $runnerSpec, array('retry' => TRUE, 'skip' => TRUE));
+ $this->buttons = CRM_Utils_Array::value('buttons', $runnerSpec, ['retry' => TRUE, 'skip' => TRUE]);
// perhaps this value should be randomized?
$this->qrid = $this->queue->getName();
}
*/
public function __sleep() {
// exclude taskCtx
- return array(
+ return [
'title',
'queue',
'errorMode',
'pathPrefix',
'qrid',
'buttons',
- );
+ ];
}
/**
}
// Fallback; web UI does redirect in Javascript
- $result = array();
+ $result = [];
$result['is_error'] = 0;
$result['numberOfItems'] = 0;
$result['is_continue'] = 0;
public function formatTaskResult($isOK, $exception = NULL) {
$numberOfItems = $this->queue->numberOfItems();
- $result = array();
+ $result = [];
$result['is_error'] = $isOK ? 0 : 1;
$result['exception'] = $exception;
$result['last_task_title'] = isset($this->lastTaskTitle) ? $this->lastTaskTitle : '';