1 | <?php |
||
78 | class DMSDocumentCartCheckoutPage_Controller extends Page_Controller |
||
79 | { |
||
80 | private static $allowed_actions = array( |
||
81 | 'DMSDocumentRequestForm' |
||
82 | ); |
||
83 | |||
84 | /** |
||
85 | * An array containing the recipients basic information |
||
86 | * |
||
87 | * @var array |
||
88 | */ |
||
89 | public static $receiverInfo = array( |
||
90 | 'ReceiverName' => '', |
||
91 | 'ReceiverPhone' => '', |
||
92 | 'ReceiverEmail' => '', |
||
93 | 'DeliveryAddressLine1' => '', |
||
94 | 'DeliveryAddressLine2' => '', |
||
95 | 'DeliveryAddressCountry' => '', |
||
96 | 'DeliveryAddressPostCode' => '', |
||
97 | ); |
||
98 | |||
99 | /** |
||
100 | * Gets and displays an editable list of items within the cart, as well as a contact form with entry |
||
101 | * fields for the recipients information. |
||
102 | * |
||
103 | * To extend use the following from within an Extension subclass: |
||
104 | * |
||
105 | * <code> |
||
106 | * public function updateDMSDocumentRequestForm($form) |
||
107 | * { |
||
108 | * // Do something here |
||
109 | * } |
||
110 | * </code> |
||
111 | * |
||
112 | * @return DMSDocumentRequestForm |
||
113 | */ |
||
114 | public function DMSDocumentRequestForm() |
||
140 | |||
141 | /** |
||
142 | * Sends an email to both the configured recipient as well as the requester. The |
||
143 | * configured recipient is bcc'ed to the email in order to fulfill it. |
||
144 | * |
||
145 | * To extend use the following from within an Extension subclass: |
||
146 | * |
||
147 | * <code> |
||
148 | * public function updateSend($email) |
||
149 | * { |
||
150 | * // Do something here |
||
151 | * } |
||
152 | * </code> |
||
153 | * @return mixed |
||
154 | * |
||
155 | * @throws DMSDocumentCartException |
||
156 | */ |
||
157 | public function send() |
||
183 | |||
184 | /** |
||
185 | * Handles form submission. |
||
186 | * Totals requested are updated, delivery details added, email sent for fulfillment |
||
187 | * and print request totals updated. |
||
188 | * |
||
189 | * @param array $data |
||
190 | * @param Form $form |
||
191 | * @param SS_HTTPRequest $request |
||
192 | * |
||
193 | * @return SS_HTTPResponse |
||
194 | */ |
||
195 | public function doRequestSend($data, Form $form, SS_HTTPRequest $request) |
||
205 | |||
206 | /** |
||
207 | * Increments the print counts of all documents which were successfully sent. |
||
208 | */ |
||
209 | public function trackTimestampedPrintRequest() |
||
218 | |||
219 | /** |
||
220 | * Retrieves a {@link DMSDocumentCart} instance |
||
221 | * |
||
222 | * @return DMSDocumentCart |
||
223 | */ |
||
224 | public function getCart() |
||
228 | |||
229 | /** |
||
230 | * Updates the document quantities just before the request is sent. |
||
231 | * |
||
232 | * @param array $data |
||
233 | */ |
||
234 | public function updateCartItems($data) |
||
247 | |||
248 | /** |
||
249 | * Updates the cart receiver info just before the request is sent. |
||
250 | * |
||
251 | * @param array $data |
||
252 | */ |
||
253 | public function updateCartReceiverInfo($data) |
||
258 | } |
||
259 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.