name = $name; $this->defaults = array_merge($this->defaults, $defaults); $widgetGroup->addWidget($name, $this); } public function getName() { return $this->name; } public function getSubFormImagePath() { return self::getAssetsPath() . '/' . $this->name . '.png'; } public function getDefaults() { return $this->defaults; } /** * @param SliderWidget $sliderWidget * * @return AbstractWidgetFrontend */ public function createFrontend($sliderWidget, $params) { $className = static::class . 'Frontend'; $params->fillDefault($this->getDefaults()); return new $className($sliderWidget, $this, $params); } public function getKey() { return $this->key; } /** * @param ExportSlider $export * @param Data $params */ public function prepareExport($export, $params) { } /** * @param ImportSlider $import * @param Data $params */ public function prepareImport($import, $params) { } /** * @param ContainerInterface $container */ abstract public function renderFields($container); }