VbzCart/docs/v1/class/vcCartForm: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | v1/class
Jump to navigation Jump to search
imported>Woozle
(Created page with "{{page/code/class}} * '''file''': {{l/project|file|page/ckout.php}} * '''inherits''': {{l/ferreteria/|v2/class/fcForm_blob}} <source lang=php> /*---- PURPOSE: adds some app-...")
 
m (Woozle moved page VbzCart/VbzCart/v1/class/vcCartForm to VbzCart/docs/v1/class/vcCartForm without leaving a redirect: part 5/5)
 
(No difference)

Latest revision as of 01:58, 25 February 2024

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;
    }
}