Add cc/bcc to rest API, re-enable in email_functions
parent
904202488d
commit
81b27ddb2e
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace BusinessLogic\Tickets\CustomFields;
|
||||
|
||||
|
||||
class CustomField {
|
||||
/* @var $id int */
|
||||
public $id;
|
||||
|
||||
/* @var $name string */
|
||||
public $name;
|
||||
|
||||
/* @var $type string */
|
||||
public $type;
|
||||
|
||||
/* @var $properties array */
|
||||
public $properties;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace DataAccess\CustomFields;
|
||||
|
||||
use BusinessLogic\Tickets\CustomFields\CustomField;
|
||||
use DataAccess\CommonDao;
|
||||
|
||||
class CustomFieldsGateway extends CommonDao {
|
||||
public function getCustomField($id, $heskSettings) {
|
||||
$this->init();
|
||||
|
||||
$rs = hesk_dbQuery("SELECT * FROM `" . hesk_dbEscape($heskSettings['db_pfix']) . "custom_fields` WHERE `id` = " . intval($id));
|
||||
|
||||
if ($row = hesk_dbFetchAssoc($rs)) {
|
||||
$customField = new CustomField();
|
||||
$customField->id = $row['id'];
|
||||
$names = json_decode($row['name'], true);
|
||||
$customField->name = (isset($names[$hesk_settings['language']])) ? $names[$heskSettings['language']] : reset($names);
|
||||
$customField->type = $row['type'];
|
||||
$customField->properties = json_decode($row['value'], true);
|
||||
|
||||
return $customField;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue