Source for file up.act.php

Documentation is available at up.act.php

  1. <?php
  2. /**
  3. * @package polyphony.basket
  4. *
  5. * @copyright Copyright &copy; 2005, Middlebury College
  6. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  7. *
  8. * @version $Id: up.act.php,v 1.6 2007/09/19 14:04:54 adamfranco Exp $
  9. */
  10.  
  11. require_once(POLYPHONY."/main/library/AbstractActions/MainWindowAction.class.php");
  12. require_once(POLYPHONY."/main/library/Basket/Basket.class.php");
  13.  
  14. /**
  15. *
  16. *
  17. * @package polyphony.basket
  18. *
  19. * @copyright Copyright &copy; 2005, Middlebury College
  20. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  21. *
  22. * @version $Id: up.act.php,v 1.6 2007/09/19 14:04:54 adamfranco Exp $
  23. */
  24. class upAction
  25. extends MainWindowAction
  26. {
  27. /**
  28. * Check Authorizations
  29. *
  30. * @return boolean
  31. * @access public
  32. * @since 4/26/05
  33. */
  34. function isAuthorizedToExecute () {
  35. // Check that the user can access this collection
  36. return TRUE;
  37. }
  38. /**
  39. * Return the heading text for this action, or an empty string.
  40. *
  41. * @return string
  42. * @access public
  43. * @since 4/26/05
  44. */
  45. function getHeadingText () {
  46. return _("Move an Item in Your Selection");
  47. }
  48. /**
  49. * Build the content for this action
  50. *
  51. * @return boolean
  52. * @access public
  53. * @since 4/26/05
  54. */
  55. function buildContent () {
  56. $actionRows =$this->getActionRows();
  57. $harmoni = Harmoni::instance();
  58. $harmoni->request->startNamespace("basket");
  59. $idManager = Services::getService("Id");
  60. $authZ = Services::getService("AuthZ");
  61. $basket = Basket::instance();
  62. $assetId =$idManager->getId(RequestContext::value("asset_id"));
  63.  
  64. $basket->moveUp($assetId);
  65.  
  66. $harmoni->request->endNamespace();
  67. RequestContext::locationHeader($harmoni->request->quickURL("basket", "view"));
  68. }
  69. }

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