Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (50 sloc) 1.25 KB
<?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\commerce\records;
use craft\db\ActiveRecord;
use craft\records\Site;
use yii\db\ActiveQueryInterface;
/**
* Product type site record.
*
* @property bool $hasUrls
* @property int $id
* @property ProductType $productType
* @property int $productTypeId
* @property Site $site
* @property int $siteId
* @property string $template
* @property string $uriFormat
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @since 2.0
*/
class ProductTypeSite extends ActiveRecord
{
// Public Methods
// =========================================================================
/**
* @inheritdoc
*/
public static function tableName(): string
{
return '{{%commerce_producttypes_sites}}';
}
/**
* @return ActiveQueryInterface
*/
public function getProductType(): ActiveQueryInterface
{
return $this->hasOne(ProductType::class, ['id', 'productTypeId']);
}
/**
* @return ActiveQueryInterface
*/
public function getSite(): ActiveQueryInterface
{
return $this->hasOne(Site::class, ['id', 'siteId']);
}
}
You can’t perform that action at this time.