SilverCart\Model\Order\OrderInvoiceAddress
abstract for an orders invoice address.
instances of $this cannot be changed by a customer.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class OrderInvoiceAddress
extends OrderAddress
{
- // Inherited constants from Address
- const TYPE_INVOICE = 'Invoice';
- const TYPE_SHIPPING = 'Shipping';
- const PERMISSION_CREATE = 'SILVERCART_ADDRESS_CREATE';
- const PERMISSION_DELETE = 'SILVERCART_ADDRESS_DELETE';
- const PERMISSION_EDIT = 'SILVERCART_ADDRESS_EDIT';
- const PERMISSION_VIEW = 'SILVERCART_ADDRESS_VIEW';
- // members
- private static boolean $api_access = true;
- // Inherited members from Address
- public static array $custom_add_export_fields;
- protected bool $isAnonymous;
- protected bool $isAnonymousShippingAddress;
- protected bool $isAnonymousInvoiceAddress;
- protected bool $isRestfulContext;
- protected bool $isCheckoutShippingAddress;
- protected bool $isCheckoutInvoiceAddress;
- protected bool|null $isOrderShippingAddress;
- protected bool|null $isOrderInvoiceAddress;
- // methods
- public string singular_name()
- public string plural_name()
- public bool canView()
- public bool canEdit()
- public bool canDelete()
- public boolean isInvoiceAddress()
- // Inherited methods from OrderAddress
- public string singular_name()
- public string plural_name()
- // Inherited methods from Address
- public static void set_invoice_address_is_readonly()
- public static bool get_invoice_address_is_readonly()
- public static bool invoice_address_is_readonly()
- public static array extract_street_name_and_number()
- public string singular_name()
- public string plural_name()
- public array providePermissions()
- public bool canView()
- public boolean canEdit()
- public bool canCreate()
- public boolean canDelete()
- public bool canSetAsDefaultInvoiceAddress()
- public bool canSetAsDefaultShippingAddress()
- public FieldList getCMSFields()
- public array summaryFields()
- public array searchableFields()
- public SearchContext getRestfulSearchContext()
- public array fieldLabels()
- public void requireDefaultRecords()
- protected void onBeforeWrite()
- public string getTitle()
- public string getSummary()
- public bool hasAddressData()
- public bool isAnonymous()
- public bool isAnonymousShippingAddress()
- public bool isAnonymousInvoiceAddress()
- public $this setIsAnonymous()
- public $this setIsAnonymousShippingAddress()
- public $this setIsAnonymousInvoiceAddress()
- public bool isCompanyAddress()
- public bool isLastAddress()
- public bool isEqual()
- public string getFullName()
- public string getSalutationText()
- public string getCountryISO2()
- public string getCountryISO3()
- public string getCountryISON()
- public string getCountryFIPS()
- public bool isInvoiceAddress()
- public bool isShippingAddress()
- public bool isInvoiceAndShippingAddress()
- public bool getIsCheckoutShippingAddress()
- public bool getIsCheckoutInvoiceAddress()
- public bool|null getIsOrderShippingAddress()
- public bool|null getIsOrderInvoiceAddress()
- public $this setIsCheckoutShippingAddress()
- public $this setIsCheckoutInvoiceAddress()
- public $this setIsOrderShippingAddress()
- public $this setIsOrderInvoiceAddress()
- public string getField()
- public string AfterAddressContent()
- public string BeforeAddressContent()
- public string BeforeCountryContent()
- public DBHTMLText forTemplate()
- public DBHTMLText render()
- public string renderPlainText()
- public int PlainTextLineCount()
- public string DeleteLink()
- public string EditLink()
- public string SetAsInvoiceAddressLink()
- public string SetAsShippingAddressLink()
- public DBHTMLText|null forEmail()
- public DBHTMLText|null forShopOwnerEmail()
- // Inherited methods from ExtensibleDataObject
- protected void beforeRequireDefaultRecords()
- protected void beforeUpdateCMSActions()
- protected void beforeUpdateFieldLabels()
- protected void beforeUpdateProvidePermissions()
- public array defaultFieldLabels()
- public static void reset_field_labels()
- protected array scaffoldFieldLabels()
Hierarchy
Constants
Name | Value |
---|---|
TYPE_INVOICE | 'Invoice' |
TYPE_SHIPPING | 'Shipping' |
PERMISSION_CREATE | 'SILVERCART_ADDRESS_CREATE' |
PERMISSION_DELETE | 'SILVERCART_ADDRESS_DELETE' |
PERMISSION_EDIT | 'SILVERCART_ADDRESS_EDIT' |
PERMISSION_VIEW | 'SILVERCART_ADDRESS_VIEW' |
Members
private
- $api_access
—
string
API access is allowed for this object
protected
- $defaultFieldLabels
—
array
Default field labels. - $isAnonymous
—
SilverCart\Model\Customer\bool
Property to indicate whether this is an anonymous address - $isAnonymousInvoiceAddress
—
SilverCart\Model\Customer\bool
Property to indicate whether this is an anonymous invoice address - $isAnonymousShippingAddress
—
SilverCart\Model\Customer\bool
Property to indicate whether this is an anonymous shipping address - $isCheckoutInvoiceAddress
—
SilverCart\Model\Customer\bool
Marks the address as invoice address in checkout context. - $isCheckoutShippingAddress
—
SilverCart\Model\Customer\bool
Marks the address as shipping address in checkout context. - $isOrderInvoiceAddress
—
SilverCart\Model\Customer\bool|null
Marks the address as invoice address in order context. - $isOrderShippingAddress
—
SilverCart\Model\Customer\bool|null
Marks the address as shipping address in order context. - $isRestfulContext
—
SilverCart\Model\Customer\bool
Determines whether the current search context is restful.
public
- $custom_add_export_fields
—
array
Custom Add Export fields to export by XML
Methods
public
- canDelete() — Indicates wether the current user can delete this object.
- canEdit() — Indicates wether the current user can edit this object.
- canView() — Indicates wether the current user can view this object.
- isInvoiceAddress() — This is always an invoice address
- plural_name() — Returns the translated plural name of the object.
- singular_name() — Returns the translated singular name of the object.
Inherited from SilverCart\Model\Order\OrderAddress
public
- plural_name() — Returns the translated plural name of the object.
- singular_name() — Returns the translated singular name of the object.
Inherited from SilverCart\Model\Customer\Address
protected
- onBeforeWrite() — Some polishing on before write
public
- AfterAddressContent() — Executes an extension hook to add some HTML content after rendering the default address content.
- BeforeAddressContent() — Executes an extension hook to add some HTML content before rendering the default address content.
- BeforeCountryContent() — Executes an extension hook to add some HTML content before rendering the country data.
- DeleteLink() — Returns the delete link.
- EditLink() — Returns the edit link.
- PlainTextLineCount() — Returns the line count of the plain text version.
- SetAsInvoiceAddressLink() — Returns the link to set this address as default invoice address.
- SetAsShippingAddressLink() — Returns the link to set this address as default shipping address.
- canCreate() — Indicates wether the current user can create this object.
- canDelete() — Indicates wether the current user can delete this object.
- canEdit() — Indicates wether the current user can edit this object.
- canSetAsDefaultInvoiceAddress() — Indicates wether the current user can set this address as default shipping address.
- canSetAsDefaultShippingAddress() — Indicates wether the current user can set this address as default shipping address.
- canView() — Indicates wether the current user can view this object.
- extract_street_name_and_number() — Extracts the street name and number out of a street with number string.
- fieldLabels() — Sets the field labels.
- forEmail() — Returns the rendered address to use in emails.
- forShopOwnerEmail() — Returns the rendered address to use in shop owner emails.
- forTemplate() — Renders the address with the default template or the template with the given $templateAddition.
- getCMSFields() — CMS fields for this object
- getCountryFIPS() — Returns the FIPS of the related country
- getCountryISO2() — Returns the ISO2 of the related country
- getCountryISO3() — Returns the ISO3 of the related country
- getCountryISON() — Returns the ISON of the related country
- getField() — returns field value for given fieldname with stripped slashes
- getFullName() — Returns the full name (first name + sur name)
- getIsCheckoutInvoiceAddress() — Returns if this address is the current invoice address in checkout context.
- getIsCheckoutShippingAddress() — Returns if this address is the current shipping address in checkout context.
- getIsOrderInvoiceAddress() — Returns if this address is the current invoice address in order context.
- getIsOrderShippingAddress() — Returns if this address is the current shipping address in order context.
- getRestfulSearchContext() — Generates a SearchContext to be used for building and processing a generic search form for properties on this object.
- getSalutationText() — Returns the localized salutation string.
- getSummary() — Returns the title to represent this address.
- getTitle() — Returns the title to represent this address.
- get_invoice_address_is_readonly() — Returns the customer readonly state for invoice addresses.
- hasAddressData() — Indicates wether this address is set as a standard address for shipping or invoicing.
- invoice_address_is_readonly() — Returns the customer readonly state for invoice addresses.
- isAnonymous() — Returns whether this is an anonymous address
- isAnonymousInvoiceAddress() — Returns whether this is an anonymous invoice address
- isAnonymousShippingAddress() — Returns whether this is an anonymous shipping address
- isCompanyAddress() — Indicates wether this address is the address of a company. The fields "Company" and "TaxIdNumber" must be filled in to conform that.
- isEqual() — Checks whether the given address equals this address.
- isInvoiceAddress() — Checks, whether this is an invoice address.
- isInvoiceAndShippingAddress() — Indicates if this is both an invoice and shipping address.
- isLastAddress() — Indicates wether this is the last address of the customer.
- isShippingAddress() — Checks, whether this is an invoice address.
- plural_name() — Returns the translated plural name of the object. If no translation exists the class name will be returned.
- providePermissions() — Set permissions.
- render() — Renders the address with the default template.
- renderPlainText() — Returns the rendered address to use as plain text.
- requireDefaultRecords() — Updates phone numbers if necessary.
- searchableFields() — Searchable fields of this object.
- setIsAnonymous() — Sets whether this is an anonymous address
- setIsAnonymousInvoiceAddress() — Sets whether this is an anonymous invoice address
- setIsAnonymousShippingAddress() — Sets whether this is an anonymous shipping address
- setIsCheckoutInvoiceAddress() — Sets if this address is the current invoice address in checkout context.
- setIsCheckoutShippingAddress() — Sets if this address is the current shipping address in checkout context.
- setIsOrderInvoiceAddress() — Sets if this address is the current invoice address in order context.
- setIsOrderShippingAddress() — Sets if this address is the current shipping address in order context.
- set_invoice_address_is_readonly() — Sets the customer readonly state for invoice addresses.
- singular_name() — Returns the translated singular name of the object. If no translation exists the class name will be returned.
- summaryFields() — Sets the summary fields.
Inherited from SilverCart\ORM\ExtensibleDataObject
protected
- beforeRequireDefaultRecords() — Allows user code to hook into DataObject::requireDefaultRecords() prior to requireDefaultRecords being called on extensions.
- beforeUpdateCMSActions() — Allows user code to hook into DataObject::getCMSActions prior to updateCMSActions being called on extensions.
- beforeUpdateFieldLabels() — Allows user code to hook into DataObject::fieldLabels() prior to updateFieldLabels being called on extensions.
- beforeUpdateProvidePermissions() — Allows user code to hook into DataObject::updateProvidePermissions() prior to providePermissions being called on extensions.
- scaffoldFieldLabels() — Returns the default field labels for this DataObject.
public
- defaultFieldLabels() — Returns the default field labels.
- reset_field_labels() — Resets the field label cache.