PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/src/notification/adapter.php +19 -1 1.6.4 → 1.8.16 View file →
@@ -89,9 +89,9 @@
89 89 * @return bool true if time is disabled.
90 90 */
91 91 public function getNoTime()
92 92 {
93 - return (bool)$this->set('_no_time', false);
93 + return (bool)$this->get('_no_time', false);
94 94 }
95 95
96 96 /**
97 97 * Controls the flag to declare a date as with no time.
@@ -108,8 +108,18 @@
108 108 return $this;
109 109 }
110 110
111 111 /**
112 + * @inheritDoc
113 + *
114 + * @since 1.16.5 (J) - 1.6.5 (WP)
115 + */
116 + public function getOptions()
117 + {
118 + return (array)$this->get('_options', []);
119 + }
120 +
121 + /**
112 122 * Returns the notification data object to be encoded.
113 123 *
114 124 * @return object the notification data object for the document.
115 125 */
@@ -114,10 +124,18 @@
114 124 * @return object the notification data object for the document.
115 125 */
116 126 public function toDataObject()
117 127 {
128 + // get all data options set
129 + $options = $this->getOptions();
130 +
118 131 // access all "public" (not reserved) properties
119 132 $props = $this->getProperties($public = true);
133 +
134 + // merge public properties with data options, if any
135 + if ($options) {
136 + $props['_options'] = $options;
137 + }
120 138
121 139 // build data object
122 140 $data = (object)$props;
123 141 $data->type = $this->getType();