/**
  * Field labels for display in tables.
  *
  * @param boolean $includerelations A boolean value to indicate if the labels returned include relation fields
  *
  * @return array
  * 
  * @author Sascha Koehler <*****@*****.**>
  * @since 23.10.2012
  */
 public function fieldLabels($includerelations = true)
 {
     $fieldLabels = array_merge(parent::fieldLabels($includerelations), SilvercartWidgetTools::fieldLabelsForProductSliderWidget($this), array('SilvercartProductGroupManufacturersWidgetLanguages' => _t('Silvercart.TRANSLATIONS')));
     $this->extend('updateFieldLabels', $fieldLabels);
     return $fieldLabels;
 }
 /**
  * Creates the cache key for this widget.
  *
  * @return string
  *
  * @author Sebastian Diel <*****@*****.**>
  * @since 03.07.2012
  */
 public function WidgetCacheKey()
 {
     $key = SilvercartWidgetTools::ProductWidgetCacheKey($this);
     return $key;
 }
 /**
  * Returns the content for non slider widgets
  *
  * @return string
  * 
  * @author Sebastian Diel <*****@*****.**>
  * @since 30.05.2012
  */
 public function ElementsContent()
 {
     return $this->customise(array('Elements' => $this->Elements()))->renderWith(SilvercartWidgetTools::getGroupViewTemplateName($this));
 }
 /**
  * Field labels for display in tables.
  *
  * @param boolean $includerelations A boolean value to indicate if the labels returned include relation fields
  *
  * @return array
  *
  * @author Roland Lehmann <*****@*****.**>,
  *         Sebastian Diel <*****@*****.**>
  * @since 01.07.2013
  */
 public function fieldLabels($includerelations = true)
 {
     $fieldLabels = array_merge(parent::fieldLabels($includerelations), SilvercartWidgetTools::fieldLabelsForProductSliderWidget($this), array('SilvercartImageSliderWidgetLanguages' => _t('Silvercart.TRANSLATIONS'), 'FrontTitle' => _t('SilvercartWidget.FRONTTITLE'), 'FrontContent' => _t('SilvercartWidget.FRONTCONTENT'), 'Images' => _t('SilvercartImage.PLURALNAME'), 'SilvercartImageSliderImage' => _t('SilvercartImageSliderImage.PLURALNAME'), 'slideImages' => _t('SilvercartProductSliderWidget.CMS_SLIDERIMAGES'), 'Translations' => _t('SilvercartConfig.TRANSLATIONS')));
     $this->extend('updateFieldLabels', $fieldLabels);
     return $fieldLabels;
 }
 /**
  * Register forms for the contained products.
  *
  * @return void
  *
  * @author Sascha Koehler <*****@*****.**>
  * @since 13.11.2012
  */
 public function init()
 {
     $this->Elements();
     if ($this->getElements()) {
         $elementIdx = 0;
         foreach ($this->getElements() as $element) {
             SilvercartWidgetTools::registerAddCartFormForProductWidget($this, $element, $elementIdx);
             $elementIdx++;
         }
     }
 }