Source of file RestrictionRegionCountryDropdownField.php
Size: 0,567 Bytes - Last Modified: 2021-12-24T06:35:03+00:00
/var/www/docs.ssmods.com/process/src/src/Forms/RestrictionRegionCountryDropdownField.php
1234567891011121314151617181920 | <?php namespace SilverShop\Forms; use SilverStripe\Forms\DropdownField; use SilverStripe\SiteConfig\SiteConfig; class RestrictionRegionCountryDropdownField extends DropdownField { public static $defaultname = "-- International --"; public function __construct($name, $title = null, $source = null, $value = "") { $source = SiteConfig::current_site_config()->getCountriesList(true); parent::__construct($name, $title, $source, $value); $this->setHasEmptyDefault(true); $this->setEmptyString(self::$defaultname); } } |