custattr

package
v0.0.0-...-0c3ba03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package custattr handles all customer and address related attributes. The name custattr has been chosen to be unique so that one can use goimports without conflicts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressBackendRegion

func AddressBackendRegion() *eav.AttributeBackend

AddressDataPostcode post code data model @todo @see magento2/site/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php

func AddressBackendStreet

func AddressBackendStreet() *eav.AttributeBackend

AddressBackendStreet handles multiline street address @todo @see Mage_Customer_Model_Resource_Address_Attribute_Backend_Street

func AddressDataPostcode

func AddressDataPostcode() *eav.AttributeData

AddressDataPostcode post code data model @todo @see magento2/site/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php

func AddressSourceCountry

func AddressSourceCountry() *eav.AttributeSource

AddressSourceCountry retrieves slice of countries @todo @see magento2/site/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Country.php

func AddressSourceRegion

func AddressSourceRegion() *eav.AttributeSource

AddressSourceRegion @see magento2/site/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Region.php

func CustomerBackendBilling

func CustomerBackendBilling() *todoABB

CustomerBackendBilling handles billing address @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Billing.php

func CustomerBackendDataBoolean

func CustomerBackendDataBoolean() *eav.AttributeBackend

CustomerBackendDataBoolean converts 1 or 0 to bool @todo @see magento2/site/app/code/Magento/Customer/Model/Attribute/Backend/Data/Boolean.php

func CustomerBackendPassword

func CustomerBackendPassword() *eav.AttributeBackend

CustomerBackendPassword handles customer passwords @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php

func CustomerBackendShipping

func CustomerBackendShipping() *eav.AttributeBackend

CustomerBackendShipping handles shipping address @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Shipping.php

func CustomerBackendStore

func CustomerBackendStore() *eav.AttributeBackend

CustomerBackendStore handles store @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Store.php

func CustomerBackendWebsite

func CustomerBackendWebsite() *eav.AttributeBackend

CustomerBackendWebsite handles website @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Website.php

func CustomerSourceGroup

func CustomerSourceGroup() todoASG

CustomerSourceGroup customer group handling @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Source/Group.php

func CustomerSourceStore

func CustomerSourceStore() *eav.AttributeSource

CustomerSourceStore handle store source @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Source/Store.php

func CustomerSourceWebsite

func CustomerSourceWebsite() *eav.AttributeSource

CustomerSourceWebsite handle store source @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Source/Website.php

func HandlerAddress

func HandlerAddress(i int64) *custHandler

func HandlerCustomer

func HandlerCustomer(i int64) *custHandler

Types

type AttributeSlice

type AttributeSlice []Attributer

AttributeSlice implements eav.AttributeSliceGetter @todo website must be present in the slice

func (AttributeSlice) ByCode

func (s AttributeSlice) ByCode(g eav.AttributeGetter, code string) (interface{}, error)

ByCode returns an custattr.Attributer by code. Use type assertion.

func (AttributeSlice) ByID

func (s AttributeSlice) ByID(g eav.AttributeGetter, id int64) (interface{}, error)

ByID returns an custattr.Attributer by int64 id. Use type assertion.

func (AttributeSlice) Index

func (s AttributeSlice) Index(i eav.AttributeIndex) interface{}

Index returns the current cust.Attributer from index i. Use type assertion.

func (AttributeSlice) Len

func (s AttributeSlice) Len() int

Len returns the length of a slice

type Attributer

type Attributer interface {
	eav.Attributer

	InputFilter() string
	Validate() bool // @todo convert php serialize string into a Go type and do only validation here
	IsSystem() bool
	SortOrder() int64
	DataModel() eav.AttributeDataModeller
	IsVisible() bool
	MultilineCount() int64
}

Attributer defines the minimal requirements for a customer attribute. This interface consists of two more tables: customer_eav_attribute and customer_eav_attribute_website. Developers can also extend these tables to add more columns. These columns will be automatically transformed into functions. Scope columns are handled transparently in eav.GetAttributeSelectSql

type Customer

type Customer struct {
	*eav.Attribute
	// contains filtered or unexported fields
}

Customer defines attribute properties for a customer and an address. You can use this struct to embed into your own struct for maybe overriding some method receivers.

func NewCustomer

func NewCustomer(
	a *eav.Attribute,
	wa WSASlice,
	isVisible bool,
	inputFilter string,
	multilineCount int64,
	validateRules string,
	isSystem bool,
	sortOrder int64,
	dataModel eav.AttributeDataModeller,
) *Customer

func (*Customer) DataModel

func (a *Customer) DataModel() eav.AttributeDataModeller

func (*Customer) InputFilter

func (a *Customer) InputFilter() string

func (*Customer) IsSystem

func (a *Customer) IsSystem() bool

func (*Customer) IsVisible

func (a *Customer) IsVisible() bool

func (*Customer) MultilineCount

func (a *Customer) MultilineCount() int64

func (*Customer) SortOrder

func (a *Customer) SortOrder() int64

func (*Customer) Validate

func (a *Customer) Validate() bool

type WSASlice

type WSASlice []*Customer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL