VbzCart/docs/v1/class/vcCartForm

From Woozle Writes Code
< VbzCart‎ | docs‎ | v1/class
Jump to navigation Jump to search

Template:Page/code/class

/*----
  PURPOSE: adds some app-specific data to the blob-form class
  NOTE: ShipZone needs to go here rather than in the formgroup objects because
    wierd things happen with it not getting set in some cases. Insufficient
    time to figure out what was going on.
  HISTORY:
    2019-03-01 Created to hopefully resolve ShipZone sometimes being NULL in formgroups.
    2019-03-05 Changed from being a blob-descendant to a form-descendant
*/
class vcCartForm extends fcForm_blob {

    public function __construct(string $sName) {
        $oBlob = new fcBlobField();
        parent::__construct($sName,$oBlob);
    }
    
    private $oZone;
    // PUBLIC for vcCartDataManager
    public function SetShipZone(vcShipCountry $oZone) {
	$this->oZone = $oZone;
    }
    // API
    public function GetShipZone() : vcShipCountry {
	return $this->oZone;
    }
}