SilverCart\Model\Product\Manufacturer
abstract for a manufacturer.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class Manufacturer
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $casting = ;
- private static string $default_sort = 'Title ASC';
- private static string $table_name = 'SilvercartManufacturer';
- // methods
- public string singular_name()
- public string plural_name()
- public array fieldLabels()
- public array summaryFields()
- public array excludeFromScaffolding()
- public FieldList getCMSFields()
- public string getDescription()
- public static string get_filter_action()
- public string Link()
- public string LinkingMode()
- public static Manufacturer getByUrlSegment()
- public void onBeforeWrite()
- public string title2urlSegment()
- public string getLogoThumbnail()
- public DataList getProducts()
- // 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
Members
private
- $casting
—
array
Casted attributes - $db
—
array
Attributes - $default_sort
—
string
Default sort and direction. - $has_many
—
array
Has-many relationships. - $has_one
—
array
Has-one relationships. - $table_name
—
string
DB table name
protected
- $defaultFieldLabels
—
array
Default field labels.
Methods
public
- Link() — Returns the link to the manufacturer filtered product list in dependence on the product group.
- LinkingMode() — Returns 'current' or 'link' to use as CSS class in dependence of the current view.
- excludeFromScaffolding() — excludes defined fields from scaffolding
- fieldLabels() — Field labels for display in tables.
- getByUrlSegment() — Returns the manufacturer by its URL segment.
- getCMSFields() — Replaces the ProductGroupID DropDownField with a GroupedDropDownField.
- getDescription() — getter for the description, looks for set translation
- getLogoThumbnail() — Returns the logo to display in a TableListField
- getProducts() — Returns the related products.
- get_filter_action() — Returns the i18n action name to filter a product group by manufacturer.
- onBeforeWrite() — Manipulates the object before writing.
- plural_name() — Returns the translated plural name.
- singular_name() — Returns the translated singular name.
- summaryFields() — Get the default summary fields for this object.
- title2urlSegment() — Remove chars from the title that are not appropriate for an url
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.