PHP Class ShopConfig, silvershop-core

Inheritance: extends CActiveRecord
ファイルを表示 Open project: burnbright/silverstripe-shop Class Usage Examples

Public Methods

Method Description
config ( ) : Config_ForClass Helper for getting static shop config.
countryCode2name ( $code ) * Convert iso country code to English country name
current ( )
getCountriesList ( boolean $prefixisocode = false ) : array Get list of allowed countries
getSingleCountry ( $fullname = false ) : string For shops that only sell to a single country, this will return the country code, otherwise null.
get_base_currency ( )
get_site_currency ( )
updateCMSFields ( FieldList $fields )

Method Details

config() public static method

The 'config' static function isn't avaialbe on Extensions.
public static config ( ) : Config_ForClass
return Config_ForClass configuration object

countryCode2name() public static method

* Convert iso country code to English country name
public static countryCode2name ( $code )

current() public static method

public static current ( )

getCountriesList() public method

Get list of allowed countries
public getCountriesList ( boolean $prefixisocode = false ) : array
$prefixisocode boolean - prefix the country code
return array

getSingleCountry() public method

For shops that only sell to a single country, this will return the country code, otherwise null.
public getSingleCountry ( $fullname = false ) : string
return string country code

get_base_currency() public static method

public static get_base_currency ( )

get_site_currency() public static method

public static get_site_currency ( )

updateCMSFields() public method

public updateCMSFields ( FieldList $fields )
$fields FieldList