prepareValue example

// Do not save default value             if ($valueData['value'] === $elementData['value'] && (empty($elementData['scope']) || $shop->getId() == $defaultShop->getId())) {
                continue;
            }

            // Simple data validation             if (!$this->validateData($elementData$valueData['value'])) {
                continue;
            }

            $valueData['value'] = $this->prepareValue($elementData$valueData['value']);

            $value = new Value();
            $value->setElement($element);
            $value->setShop($shop);
            $value->setValue($valueData['value']);
            $values[$shop->getId()] = $value;
        }

        $this->beforeSaveElement($elementData);

        $values = Shopware()->Events()->filter(
            
Home | Imprint | This part of the site doesn't use cookies.