• プラグイン一覧
    - WCEX Item Combo Set
    - WCEX Amazon Pay
    - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • お問い合わせ
  • サポート
    • よくある質問
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
    • リファレンス
      • WCEX Amazon Pay
      • WCEX Wishlist お気に入りリスト
      • wcex-item-combo-set
新規会員登録
ログイン
新規会員登録
ログイン
カート
  • プラグイン一覧
    • - WCEX Item Combo Set
    • - WCEX Amazon Pay
    • - WCEX Wishlist お気に入りリスト
  • リリース情報
  • お役立ちコラム
  • サポート
    • - よくある質問
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
    • - リファレンス
      • - WCEX Amazon Pay
      • - WCEX Wishlist お気に入りリスト
      • - wcex-item-combo-set
  • お問い合わせ
Aivec APPs > wcex-item-combo-set > クラス > ComboSet
レファレンス
バージョン
1.0.6
絞り込み:

目次

  • ソース
  • 関数

フック

  • アクション
  • フィルター

ファンクション

    クラス

    ComboSet

    Represents a combo-set

    ソース #ソース

    ファイル: src/Types/ComboSet.php

    class ComboSet extends SkuItem implements JsonSerializable
    {
        /**
         * Combo-set ID
         *
         * @var int
         */
        private $id;
    
        /**
         * Combo-set groups
         *
         * @var ComboGroup[]
         */
        private $groups;
    
        /**
         * Flag for enabling/disabling item options for group items
         *
         * @var bool
         */
        private $enableItemOptions;
    
        /**
         * Flag for enabling/disabling `wcex_multiprice` for group item options
         *
         * @var bool
         */
        private $enableMultiprice;
    
        /**
         * Created at UTC `DATETIME` string
         *
         * @var string
         */
        private $createdAt;
    
        /**
         * Updated at UTC `DATETIME` string
         *
         * @var string
         */
        private $updatedAt;
    
        /**
         * Constructs a combo-set item
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @param int          $id
         * @param int          $skuMetaId
         * @param ComboGroup[] $groups
         * @param bool         $enableItemOptions
         * @param bool         $enableMultiprice
         * @param string       $createdAt
         * @param string       $updatedAt
         * @return void
         */
        public function __construct(
            $id,
            $skuMetaId,
            $groups,
            $enableItemOptions,
            $enableMultiprice,
            $createdAt,
            $updatedAt
        ) {
            parent::__construct($skuMetaId);
            $this->id = (int)$id;
            $this->groups = is_array($groups) ? $groups : [];
            $this->enableItemOptions = (bool)$enableItemOptions;
            $this->enableMultiprice = (bool)$enableMultiprice;
            $this->createdAt = $createdAt;
            $this->updatedAt = $updatedAt;
        }
    
        /**
         * Returns JSON serializable array
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return array
         */
        public function jsonSerialize() {
            return array_merge(
                parent::jsonSerialize(),
                $this->getJson()
            );
        }
    
        /**
         * Returns key-value array for the combo-set excluding item and SKU data
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return (int|ComboGroup[]|bool|string)[]
         */
        public function getJson() {
            return [
                'id' => $this->id,
                'groups' => $this->groups,
                'enableItemOptions' => $this->enableItemOptions,
                'enableMultiprice' => $this->enableMultiprice,
                'createdAt' => $this->createdAt,
                'updatedAt' => $this->updatedAt,
            ];
        }
    
        /**
         * Returns data for use in logging
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return int[]
         */
        public function getDataForLog() {
            return [
                'comboSetId' => $this->id,
                'comboSetPostId' => $this->postId,
                'comboSetSkuMetaId' => $this->skuMetaId,
            ];
        }
    
        /**
         * Getter for `$this->id`
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return int
         */
        public function getId() {
            return $this->id;
        }
    
        /**
         * Getter for `$this->groups`
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return ComboGroup[]
         */
        public function getGroups() {
            return $this->groups;
        }
    
        /**
         * Getter for `$this->enableItemOptions`
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return bool
         */
        public function getEnableItemOptions() {
            return $this->enableItemOptions;
        }
    
        /**
         * Getter for `$this->enableMultiprice`
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return bool
         */
        public function getEnableMultiprice() {
            return $this->enableMultiprice;
        }
    
        /**
         * Getter for `$this->createdAt`
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return string
         */
        public function getCreatedAt() {
            return $this->createdAt;
        }
    
        /**
         * Getter for `$this->updatedAt`
         *
         * @author Evan D Shaw <evandanielshaw@gmail.com>
         * @return string
         */
        public function getUpdatedAt() {
            return $this->updatedAt;
        }
    }
    

    ソースを伸ばす ソースを縮める


    関数 #関数

    Top ↑

    • __construct — Constructs a combo-set item
    • getCreatedAt — Getter for `$this->createdAt`
    • getDataForLog — Returns data for use in logging
    • getEnableItemOptions — Getter for `$this->enableItemOptions`
    • getEnableMultiprice — Getter for `$this->enableMultiprice`
    • getGroups — Getter for `$this->groups`
    • getId — Getter for `$this->id`
    • getJson — Returns key-value array for the combo-set excluding item and SKU data
    • getUpdatedAt — Getter for `$this->updatedAt`
    • jsonSerialize — Returns JSON serializable array

    • 新規会員登録
    • ログイン
      • プラグイン一覧
      • 会社概要
      • リリース情報
      • よくある質問
      • お役立ちコラム
      • お問い合わせ
      • 個人情報保護方針
      • 特定商取引法に基づく表記
      • 情報セキュリティ基本方針
      • 利用規約

    アイベック合同会社は「Welcart」「Amazon Pay」の公式パートナーです。

    ※Amazon、Amazon.co.jp、Amazon Payおよびそれらのロゴは、Amazon.com,inc.またはその関連会社の商標です。

    © 2025 Aivec llc All Rights Reserved.