/main/modules/basket/empty.act.php
PHP | 43 lines | 16 code | 7 blank | 20 comment | 0 complexity | 619f75b6bd206bd55fd949184bc22b39 MD5 | raw file
Possible License(s): GPL-2.0
- <?php
- /**
- * @since 12/14/05
- * @package polyphony.basket
- *
- * @copyright Copyright © 2005, Middlebury College
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
- *
- * @version $Id: empty.act.php,v 1.6 2007/09/19 14:04:54 adamfranco Exp $
- */
- require_once(POLYPHONY."/main/library/AbstractActions/MainWindowAction.class.php");
- /**
- * empties the basket
- *
- * @since 12/14/05
- * @package polyphony.basket
- *
- * @copyright Copyright © 2005, Middlebury College
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
- *
- * @version $Id: empty.act.php,v 1.6 2007/09/19 14:04:54 adamfranco Exp $
- */
- class emptyAction
- extends MainWindowAction {
- function isAuthorizedToExecute() {
- return true;
- }
- function buildContent() {
- $harmoni = Harmoni::Instance();
-
- $basket = Basket::instance();
- $basket->removeAllItems();
-
- RequestContext::locationHeader(
- $harmoni->request->quickURL("basket", "view"));
- }
- }
- ?>