1 | <?php |
||
14 | class EventsAdmin extends CoreAdmin |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Selector for the Add new Event button in the admin. |
||
19 | * @var string |
||
20 | */ |
||
21 | const ADD_NEW_EVENT_BUTTON_SELECTOR = '#add-new-event'; |
||
22 | |||
23 | |||
24 | /** |
||
25 | * Selector for the Event Title field in the event editor |
||
26 | * @var string |
||
27 | */ |
||
28 | const EVENT_EDITOR_TITLE_FIELD_SELECTOR = "//input[@id='title']"; |
||
29 | |||
30 | /** |
||
31 | * Selector for the publish submit button in the event editor. |
||
32 | * @var string |
||
33 | */ |
||
34 | const EVENT_EDITOR_PUBLISH_BUTTON_SELECTOR = "#publish"; |
||
35 | |||
36 | |||
37 | /** |
||
38 | * Selector for the save button in the event editor |
||
39 | */ |
||
40 | const EVENT_EDITOR_SAVE_BUTTON_SELECTOR = "#save-post"; |
||
41 | |||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | const EVENT_EDITOR_DEFAULT_REGISTRATION_STATUS_FIELD_SELECTOR = '#EVT_default_registration_status'; |
||
47 | |||
48 | /** |
||
49 | * Selector for the view link after publishing an event. |
||
50 | * @var string |
||
51 | */ |
||
52 | const EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR = "//span[@id='sample-permalink']/a"; |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Selector for the ID of the event in the event editor |
||
57 | * @var string |
||
58 | */ |
||
59 | const EVENT_EDITOR_EVT_ID_SELECTOR = "//input[@id='post_ID']"; |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Selector for the search input on the event list table page. |
||
64 | * @var string |
||
65 | */ |
||
66 | const EVENT_LIST_TABLE_SEARCH_INPUT_SELECTOR = '#toplevel_page_espresso_events-search-input'; |
||
67 | |||
68 | |||
69 | |||
70 | |||
71 | /** |
||
72 | * @param string $additional_params |
||
73 | * @return string |
||
74 | */ |
||
75 | public static function defaultEventsListTableUrl($additional_params = '') |
||
79 | |||
80 | |||
81 | /** |
||
82 | * The selector for the DTTname field for the given row in the event editor. |
||
83 | * @param int $row_number |
||
84 | * @return string |
||
85 | */ |
||
86 | public static function eventEditorDatetimeNameFieldSelector($row_number = 1) |
||
90 | |||
91 | |||
92 | /** |
||
93 | * The selector for the DTT_EVT_start field for the given row in the event editor.d |
||
94 | * @param int $row_number |
||
95 | * @return string |
||
96 | */ |
||
97 | public static function eventEditorDatetimeStartDateFieldSelector($row_number = 1) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * Wrapper for getting the selector for a given field and given row of a datetime in the event editor. |
||
105 | * |
||
106 | * @param string $field_name |
||
107 | * @param int $row_number |
||
108 | * @return string |
||
109 | */ |
||
110 | public static function eventEditorDatetimeFieldSelectorForField($field_name, $row_number = 1) |
||
114 | |||
115 | |||
116 | /** |
||
117 | * The selector for the TKT_name field for the given display row in the event editor. |
||
118 | * @param int $row_number |
||
119 | * @return string |
||
120 | */ |
||
121 | public static function eventEditorTicketNameFieldSelector($row_number = 1) |
||
125 | |||
126 | |||
127 | /** |
||
128 | * Selector for the TKT_base_price field for the given display row in the event editor. |
||
129 | * @param int $row_number |
||
130 | * @return string |
||
131 | */ |
||
132 | public static function eventEditorTicketPriceFieldSelector($row_number = 1) |
||
136 | |||
137 | |||
138 | /** |
||
139 | * Selector for the TKT_qty field for the given display row in the event editor. |
||
140 | * @param int $row_number |
||
141 | * @return string |
||
142 | */ |
||
143 | public static function eventEditorTicketQuantityFieldSelector($row_number = 1) |
||
147 | |||
148 | |||
149 | /** |
||
150 | * Selector for the advanced details toggle for the ticket for the given display row in the event editor. |
||
151 | * @param int $row_number |
||
152 | * @return string |
||
153 | */ |
||
154 | public static function eventEditorTicketAdvancedDetailsSelector($row_number = 1) |
||
158 | |||
159 | |||
160 | /** |
||
161 | * Selector for the subtotal amount for the given display row of the ticket in the event editor. |
||
162 | * @param int $row_number |
||
163 | * @return string |
||
164 | */ |
||
165 | public static function eventEditorTicketAdvancedDetailsSubtotalSelector($row_number = 1) |
||
169 | |||
170 | |||
171 | /** |
||
172 | * Selector for the Total element for the given display row of the ticket in the event editor. |
||
173 | * @param int $row_number |
||
174 | * @return string |
||
175 | */ |
||
176 | public static function eventEditorTicketAdvancedDetailsTotalSelector($row_number = 1) |
||
180 | |||
181 | |||
182 | /** |
||
183 | * Selector for the taxable selector for the ticket for the given display row in the event editor. |
||
184 | * @param int $row_number |
||
185 | * @return string |
||
186 | */ |
||
187 | public static function eventEditorTicketTaxableCheckboxSelector($row_number = 1) |
||
191 | |||
192 | |||
193 | /** |
||
194 | * This returns the xpath locater for the Tax amount display container within the advanced settings view for the |
||
195 | * given ticket (row) and the given tax id (PRC_ID). |
||
196 | * |
||
197 | * @param int $tax_id The PRC_ID for the tax you want the locater for. Note, this defaults to the default tax |
||
198 | * setup on a fresh install. |
||
199 | * @param int $row_number What row representing the ticket you want the locator for. |
||
200 | * @return string |
||
201 | */ |
||
202 | public static function eventEditorTicketTaxAmountDisplayForTaxIdAndTicketRowSelector($tax_id = 2, $row_number = 1) |
||
206 | |||
207 | |||
208 | /** |
||
209 | * Wrapper for getting the selector for a given field and given display row of a ticket in the event editor. |
||
210 | * @param $field_name |
||
211 | * @param int $row_number |
||
212 | * @return string |
||
213 | */ |
||
214 | public static function eventEditorTicketFieldSelectorForFieldInDisplayRow($field_name, $row_number = 1) |
||
218 | |||
219 | |||
220 | /** |
||
221 | * Returns the selector for the event title edit link in the events list table for the given Event Title. |
||
222 | * @param string $event_title |
||
223 | * @return string |
||
224 | */ |
||
225 | public static function eventListTableEventTitleEditLinkSelectorForTitle($event_title) |
||
229 | |||
230 | |||
231 | /** |
||
232 | * Locator for for the ID column in the event list table for a given event title. |
||
233 | * @param string $event_title |
||
234 | * @return string |
||
235 | */ |
||
236 | public static function eventListTableEventIdSelectorForTitle($event_title) |
||
241 | |||
242 | |||
243 | /** |
||
244 | * Locator for the view link in the row of an event list table for the given event title. |
||
245 | * @param string $event_title |
||
246 | * @return string |
||
247 | */ |
||
248 | public static function eventListTableEventTitleViewLinkSelectorForTitle($event_title) |
||
253 | |||
254 | |||
255 | /** |
||
256 | * Locator for the messenger tab in the Notifications metabox in the event editor. |
||
257 | * @param string $messenger_slug The slug for the messenger (it's reference slug). |
||
258 | * @return string |
||
259 | */ |
||
260 | public static function eventEditorNotificationsMetaBoxMessengerTabSelector($messenger_slug) |
||
265 | |||
266 | |||
267 | /** |
||
268 | * Locator for the select input within the notifications metabox. |
||
269 | * Note, this assumes the tab content for the related messenger is already visible. |
||
270 | * @param string $message_type_label The message type label (visible string in the table) you want the selector for. |
||
271 | * @return string |
||
272 | */ |
||
273 | public static function eventEditorNotificationsMetaBoxSelectSelectorForMessageType($message_type_label) |
||
280 | } |
||
281 |