SilverCart\Model\Widgets\ImageSliderImage
DataObject to handle images added to a product or sth. else.
Provides additional (meta-)information about the image.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class ImageSliderImage
extends DataObject
{
- // members
- private static array $db = ;
- private static array $casting = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $belongs_many_many = ;
- private static string $table_name = 'SilvercartImageSliderImage';
- protected bool $getCMSFieldsIsCalled = false;
- // methods
- public string getTitle()
- public string singular_name()
- public string plural_name()
- public array excludeFromScaffolding()
- public string getContent()
- public string getAltText()
- public Image Image()
- public FieldList getCMSFields()
- public array fieldLabels()
- public array summaryFields()
- public array searchableFields()
- public SiteTree|Product|null LinkedSite()
- public string|null Link()
- public string|null LinkTarget()
- public Image_Cached getThumbnail()
- // 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
- $belongs_many_many
—
array
Belongs-many-many relationships. - $casting
—
array
Casted properties - $db
—
array
DB properties - $has_many
—
array
1:n relationships. - $has_one
—
array
Has-one relationships. - $table_name
—
string
DB table name
protected
- $defaultFieldLabels
—
array
Default field labels. - $getCMSFieldsIsCalled
—
SilverCart\Model\Widgets\bool
Marker to check whether the CMS fields are called or not
Methods
public
- Image() — Returns the image respecting the current translation context.
- Link() — Returns the image's link.
- LinkTarget() — Returns the link target _blank if there is only an external link set.
- LinkedSite() — Returns the linked SiteTree or Product object or NULL.
- excludeFromScaffolding() — Returns an array of field/relation names (db, has_one, has_many, many_many, belongs_many_many) to exclude from form scaffolding in backend.
- fieldLabels() — Field labels for display in tables.
- getAltText() — getter for the AltText, looks for set translation
- getCMSFields() — Returns the input fields for this widget.
- getContent() — getter for the content, looks for set translation
- getThumbnail() — Returns the URL to a thumbnail if an image is assigned.
- getTitle() — getter for the Title, looks for set translation
- plural_name() — Returns the translated plural name of the object. If no translation exists the class name will be returned.
- searchableFields() — Searchable fields definition
- singular_name() — Returns the translated singular name of the object. If no translation exists the class name will be returned.
- summaryFields() — Summaryfields for display in tables.
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.