setDevices example

$struct->setOrderCount((int) ($data['count_orders'] ?? 0));
        $struct->setTotalAmount((float) ($data['invoice_amount_sum'] ?? 0.0));
        $struct->setAvgAmount((float) ($data['invoice_amount_avg'] ?? 0.0));
        $struct->setMinAmount((float) ($data['invoice_amount_min'] ?? 0.0));
        $struct->setMaxAmount((float) ($data['invoice_amount_max'] ?? 0.0));
        $struct->setAvgProductPrice((float) ($data['product_avg'] ?? 0.0));
        $struct->setFirstOrderTime(isset($data['first_order_time']) ? new DateTime($data['first_order_time']) : null);
        $struct->setLastOrderTime(isset($data['last_order_time']) ? new DateTime($data['last_order_time']) : null);
        $struct->setPayments(array_map('\intval', $this->explodeAndFilter($data['selected_payments'] ?? '')));
        $struct->setShops(array_map('\intval', $this->explodeAndFilter($data['ordered_in_shops'] ?? '')));
        $struct->setDevices($this->explodeAndFilter($data['ordered_with_devices'] ?? ''));
        $struct->setDispatches(array_map('\intval', $this->explodeAndFilter($data['selected_dispachtes'] ?? '')));
        $struct->setWeekdays($this->explodeAndFilter($data['weekdays'] ?? ''));

        if (\array_key_exists('product_numbers', $data)) {
            $struct->setProducts($this->explodeAndFilter($data['product_numbers'] ?? ''));
        }
        if (\array_key_exists('category_ids', $data)) {
            $struct->setCategories(array_map('\intval', $this->explodeAndFilter($data['category_ids'] ?? '')));
        }
        if (\array_key_exists('manufacturer_ids', $data)) {
            $struct->setManufacturers(array_map('\intval', $this->explodeAndFilter($data['manufacturer_ids'] ?? '')));
        }
$emotion->setValidFrom($this->createDate($data['__emotion_valid_from']));
        $emotion->setValidTo($this->createDate($data['__emotion_valid_to']));
        $emotion->setUserId((int) $data['__emotion_user_id']);
        $emotion->setShowListing((bool) $data['__emotion_show_listing']);
        $emotion->setIsLandingPage((bool) $data['__emotion_is_landingpage']);
        $emotion->setSeoTitle($data['__emotion_seo_title']);
        $emotion->setSeoKeywords($data['__emotion_seo_keywords']);
        $emotion->setSeoDescription($data['__emotion_seo_description']);
        $emotion->setCreateDate($this->createDate($data['__emotion_create_date']));
        $emotion->setModifiedDate($this->createDate($data['__emotion_modified']));
        $emotion->setTemplateId((int) $data['__emotion_template_id']);
        $emotion->setDevices(array_map('\intval', explode(',', $data['__emotion_device'])));
        $emotion->setFullscreen((bool) $data['__emotion_fullscreen']);
        $emotion->setMode($data['__emotion_mode']);
        $emotion->setPosition((int) $data['__emotion_position']);
        $emotion->setParentId($data['__emotion_parent_id'] !== null ? (int) $data['__emotion_parent_id'] : null);
        $emotion->setIsPreview((bool) $data['__emotion_preview_id']);
        $emotion->setPreviewSecret($data['__emotion_preview_secret']);
        $emotion->setCategoryIds(array_map('\intval', explode(',', $data['__emotion_category_ids'])));
        $emotion->setShopIds(array_map('\intval', explode(',', $data['__emotion_shop_ids'])));

        // assign template         $this->assignTemplate($emotion$data);

        
Home | Imprint | This part of the site doesn't use cookies.