setOneToOne example


        return $this->attribute;
    }

    /** * @param CountryAttribute|array|null $attribute * * @return Country */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, CountryAttribute::class, 'attribute', 'country');
    }

    /** * @return ArrayCollection<State> */
    public function getStates()
    {
        return $this->states;
    }

    /** * @param ArrayCollection<int, State>|State[]|null $states * * @return Country */

        return $this->attribute;
    }

    /** * @param TemplatePriceAttribute|array|null $attribute * * @return Price */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, TemplatePriceAttribute::class, 'attribute', 'templatePrice');
    }

    /** * @return Template|null */
    public function getTemplate()
    {
        return $this->template;
    }

    /** * @param Template|null $template */

        return $this->attribute;
    }

    /** * @param \Shopware\Models\Attribute\Partner|array|null $attribute * * @return \Shopware\Models\Partner\Partner */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, \Shopware\Models\Attribute\Partner::class, 'attribute', 'partner');
    }
}


    /** * @param Status[]|null $status * * @return Mail */
    public function setStatus($status)
    {
        $this->mailtype = self::MAILTYPE_STATE;

        return $this->setOneToOne($status, Status::class, 'status', 'mail');
    }

    /** * @return Attachment[] */
    public function getAttachments()
    {
        return $this->attachments->toArray();
    }

    /** * @param Attachment[]|null $attachments * * @return Mail */

        return $this->mainDetail;
    }

    /** * @param Detail|null $mainDetail * * @return Article */
    public function setMainDetail($mainDetail)
    {
        $this->setOneToOne($mainDetail, Detail::class, 'mainDetail', 'article');
        if ($this->mainDetail instanceof Detail) {
            $this->mainDetail->setKind(1);
        }

        return $this;
    }

    /** * @return PriceGroup|null */
    public function getPriceGroup()
    {

        return $this->attribute;
    }

    /** * @param CustomerAddressAttribute|array|null $attribute * * @return Address */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, CustomerAddressAttribute::class, 'attribute', 'customerAddress');
    }

    /** * @return Customer */
    public function getCustomer()
    {
        return $this->customer;
    }

    public function setCustomer(Customer $customer)
    {

        return $this->attribute;
    }

    /** * @param TemplateAttribute|array|null $attribute * * @return Template */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, TemplateAttribute::class, 'attribute', 'template');
    }

    /** * @return \Doctrine\Common\Collections\ArrayCollection */
    public function getPrices()
    {
        return $this->prices;
    }

    /** * @param Price[]|null $prices * * @return Template */

        return $this->attribute;
    }

    /** * @param ProductFeedAttribute|array|null $attribute * * @return ProductFeed */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, ProductFeedAttribute::class, 'attribute', 'productFeed');
    }

    /** * Set cache refreshed datetime * * @param DateTimeInterface|string|null $cacheRefreshed * * @return ProductFeed */
    public function setCacheRefreshed($cacheRefreshed)
    {
        

        return $this->attribute;
    }

    /** * @param ArrayCollection<CustomerGroup>|null $attribute * * @return Group */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, CustomerGroup::class, 'attribute', 'customerGroup');
    }

    /** * @return array */
    public function toArray()
    {
        return [
            'id' => $this->getId(),
            'key' => $this->getKey(),
            'tax' => $this->getTax(),
            

        return $this->attribute;
    }

    /** * @param PropertyGroupAttribute|array|null $attribute * * @return Group */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, PropertyGroupAttribute::class, 'attribute', 'propertyGroup');
    }
}

        return $this->attribute;
    }

    /** * @param ProductAttribute|array|null $attribute * * @return Detail */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, ProductAttribute::class, 'attribute', 'articleDetail');
    }

    /** * @return ArrayCollection<array-key, Price> */
    public function getPrices()
    {
        return $this->prices;
    }

    /** * @param ArrayCollection<array-key, Price>|array<Price>|null $prices * * @return Detail */

        return $this->attribute;
    }

    /** * @param ShopAttribute|array|null $attribute * * @return Shop */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, Shop::class, 'attribute', 'shop');
    }

    /** * @param string $name */
    public function get($name)
    {
        switch ($name) {
            case 'isocode':
                return $this->getId();
            case 'skipbackend':
                

        return $this->attribute;
    }

    /** * @param BannerAttribute|array|null $attribute * * @return Banner */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, BannerAttribute::class, 'attribute', 'banner');
    }
}

        return $this->value;
    }

    /** * @param Text|null $text * * @return Container */
    public function setText($text)
    {
        $return = $this->setOneToOne($text, Text::class, 'text', 'container');
        $this->setType(self::TYPE_TEXT);

        return $return;
    }

    /** * @return Text|null */
    public function getText()
    {
        return $this->text;
    }

        return $this->attribute;
    }

    /** * @param OrderBillingAttribute|array|null $attribute * * @return Billing */
    public function setAttribute($attribute)
    {
        return $this->setOneToOne($attribute, OrderBillingAttribute::class, 'attribute', 'orderBilling');
    }

    /** * Setter function for the setAdditionalAddressLine2 column property. * * @param string|null $additionalAddressLine2 */
    public function setAdditionalAddressLine2($additionalAddressLine2)
    {
        if (\is_string($additionalAddressLine2)) {
            $additionalAddressLine2 = $this->cleanup($additionalAddressLine2);
        }
Home | Imprint | This part of the site doesn't use cookies.