Sunnysideup\EcommerceCustomProductLists\Model\CustomProductList
1. titles should not be identical 2. when copying accross, we have to make sure 3. onAfterWrite, do we add products from InternalItemCodeList? 4. How can we remove products?
Synopsis
class CustomProductList
extends DataObject
{
- // members
- private static string $separator = ',';
- private static string $separator_alternative = ';';
- private static string $table_name = 'CustomProductList';
- private static array $db = ;
- private static array $indexes = ;
- private static array $many_many = ;
- private static array $searchable_fields = ;
- private static array $summary_fields = ;
- private static array $field_labels = ;
- private static array $default_sort = ;
- private static array $casting = ;
- // methods
- public void getFullName()
- public bool canDelete()
- public void getCMSFields()
- public void getCMSValidator()
- public void populateDefaults()
- public void getProductsAsInternalItemsArray()
- public DataList Products()
- public DataList getProductsFromInternalItemIDs()
- protected void onBeforeWrite()
- protected void onAfterWrite()
- protected void AddProductsToString()
- protected void AddProductCodesToString()
- protected void RemoveProductsFromString()
- protected void AddProductToString()
- protected void AddProductCodeToString()
- protected void RemoveProductFromString()
- protected void setProductsFromArray()
- protected void defaultTitle()
- protected void generateTitle()
- protected void titleExists()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $casting
- $db
- $default_sort
- $field_labels
- $indexes
- $many_many
- $searchable_fields
- $separator
—
string
how are product codes separated? - $separator_alternative
—
string
if a product separator is used in the product code then it will be replaced by this variable. - $summary_fields
- $table_name
Methods
protected
- AddProductCodeToString() — add one product, using InternalItemID.
- AddProductCodesToString() — add one product, using InternalItemID.
- AddProductToString() — add one product.
- AddProductsToString() — add many products.
- RemoveProductFromString() — remove one product.
- RemoveProductsFromString() — remove many products.
- defaultTitle()
- generateTitle()
- onAfterWrite()
- onBeforeWrite()
- setProductsFromArray()
- titleExists()
public
- Products() — This is useful as a way to separate.
- canDelete() — Deleting Permissions.
- getCMSFields()
- getCMSValidator()
- getFullName()
- getProductsAsInternalItemsArray()
- getProductsFromInternalItemIDs()
- populateDefaults()