Source for file emptyAjax.act.php

Documentation is available at emptyAjax.act.php

  1. <?php
  2. /**
  3. * @since 5/5/06
  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: emptyAjax.act.php,v 1.5 2007/09/19 14:04:54 adamfranco Exp $
  10. */
  11.  
  12. require_once(POLYPHONY."/main/library/AbstractActions/MainWindowAction.class.php");
  13. require_once(POLYPHONY."/main/library/Basket/Basket.class.php");
  14.  
  15. /**
  16. * empties the basket
  17. *
  18. * @since 5/5/06
  19. * @package polyphony.basket
  20. *
  21. * @copyright Copyright &copy; 2005, Middlebury College
  22. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  23. *
  24. * @version $Id: emptyAjax.act.php,v 1.5 2007/09/19 14:04:54 adamfranco Exp $
  25. */
  26. class emptyAjaxAction
  27. extends MainWindowAction {
  28.  
  29. /**
  30. * Check Authorizations
  31. *
  32. * @return boolean
  33. * @access public
  34. * @since 5/5/06
  35. */
  36. function isAuthorizedToExecute () {
  37. // Check that the user can access this collection
  38. return TRUE;
  39. }
  40. /**
  41. * Return the heading text for this action, or an empty string.
  42. *
  43. * @return string
  44. * @access public
  45. * @since 5/5/06
  46. */
  47. function getHeadingText () {
  48. return _("Empty Your Selection");
  49. }
  50. /**
  51. * Build the content for this action
  52. *
  53. * @return boolean
  54. * @access public
  55. * @since 5/5/06
  56. */
  57. function execute () {
  58. $harmoni = Harmoni::Instance();
  59. $basket = Basket::instance();
  60. $basket->removeAllItems();
  61. print $basket->getSmallBasketHtml();
  62. exit;
  63. }
  64. }
  65.  
  66. ?>

Documentation generated on Wed, 19 Sep 2007 10:23:01 -0400 by phpDocumentor 1.3.0RC3