85 $settings = (object) ((isset($data[
'SETTINGS']) && is_array($data[
'SETTINGS'])) ? $data[
'SETTINGS'] : array());
86 $data = parent::prepareHistoryDataModel($data, $options);
93 $entity =
new Entity\Ad($settings->letterId);
94 $settings->path =
'/marketing/ads/edit/' . $settings->letterId .
'/';
95 $settings->messageName = $entity->getMessage()->getName();
100 $settings->path =
'/marketing/letter/edit/' . $settings->letterId .
'/';
101 $settings->messageName = $entity->getMessage()->getName();
103 $settings->letterTitle = $entity->get(
'TITLE');
105 if ($settings->recipient)
107 $row = PostingRecipientTable::getRow([
108 'select' => [
'IS_READ',
'IS_CLICK',
'IS_UNSUB',
'STATUS'],
109 'filter' => [
'=ID' => $settings->recipient[
'id']]
111 $settings->isRead = $row ? $row[
'IS_READ'] ==
'Y' :
false;
112 $settings->isClick = $row ? $row[
'IS_CLICK'] ==
'Y' :
false;
113 $settings->isUnsub = $row ? $row[
'IS_UNSUB'] ==
'Y' :
false;
118 $data[
'SETTINGS'] = (array) $settings;