1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 19:22:42 +01:00
phorge-phorge/src/aphront/response/AphrontReloadResponse.php

22 lines
555 B
PHP
Raw Normal View History

<?php
/**
* When actions happen over a JX.Workflow, we may want to reload the page
* if the action is javascript-driven but redirect if it isn't. This preserves
* query parameters in the javascript case. A reload response behaves like
* a redirect response but causes a page reload when received via workflow.
*
* @group aphront
*/
final class AphrontReloadResponse extends AphrontRedirectResponse {
public function getURI() {
if ($this->getRequest()->isAjax()) {
return null;
} else {
return parent::getURI();
}
}
}