PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/main/modules/basket/empty.act.php

https://github.com/adamfranco/polyphony
PHP | 43 lines | 16 code | 7 blank | 20 comment | 0 complexity | 619f75b6bd206bd55fd949184bc22b39 MD5 | raw file
Possible License(s): GPL-2.0
  1. <?php
  2. /**
  3. * @since 12/14/05
  4. * @package polyphony.basket
  5. *
  6. * @copyright Copyright &copy; 2005, Middlebury College
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  8. *
  9. * @version $Id: empty.act.php,v 1.6 2007/09/19 14:04:54 adamfranco Exp $
  10. */
  11. require_once(POLYPHONY."/main/library/AbstractActions/MainWindowAction.class.php");
  12. /**
  13. * empties the basket
  14. *
  15. * @since 12/14/05
  16. * @package polyphony.basket
  17. *
  18. * @copyright Copyright &copy; 2005, Middlebury College
  19. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  20. *
  21. * @version $Id: empty.act.php,v 1.6 2007/09/19 14:04:54 adamfranco Exp $
  22. */
  23. class emptyAction
  24. extends MainWindowAction {
  25. function isAuthorizedToExecute() {
  26. return true;
  27. }
  28. function buildContent() {
  29. $harmoni = Harmoni::Instance();
  30. $basket = Basket::instance();
  31. $basket->removeAllItems();
  32. RequestContext::locationHeader(
  33. $harmoni->request->quickURL("basket", "view"));
  34. }
  35. }
  36. ?>