PHP 클래스 Product

User: John Kagga Date: 8/1/2015 Time: 9:46 AM
파일 보기 프로젝트 열기: yupe/yupe 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$selectedVariants array

보호된 프로퍼티들

프로퍼티 타입 설명
$_attributesValues array
$_typeAttributes
$_variantsOptions кеш getVariantsOptions

공개 메소드들

메소드 설명
attribute ( $attribute, null $default = null ) : boolean | float | integer | null | string | array
attributeDescriptions ( ) : array
attributeFile ( $attribute ) : string
attributeLabels ( ) : array
attributes ( )
beforeDelete ( ) : boolean
beforeValidate ( ) : boolean
behaviors ( ) : array
copy ( ) : null | Product
getAttributeGroups ( ) : array
getBasePrice ( ) : float
getCategoriesId ( ) : mixed
getCategoryId ( ) : null | string
getDiscountPrice ( ) : float
getId ( ) : mixed
getImageAlt ( ) : string Get image alt tag text
getImageTitle ( ) : string Get image title tag text
getImages ( ) : ProductImage[]
getInStockList ( ) : array
getLink ( ) : mixed
getLinkedProducts ( null | string $typeCode = null ) : Product[] Список связанных с продуктом продуктов
getLinkedProductsCriteria ( null | string $typeCode = null ) : CDbCriteria
getLinkedProductsDataProvider ( null | string $typeCode = null ) : CActiveDataProvider
getMetaCanonical ( ) : string Get canonical url
getMetaDescription ( ) : string
getMetaKeywords ( ) : string
getMetaTitle ( ) : string
getName ( ) : string
getPrice ( array $variantsIds = [] ) : float | mixed
getProducerName ( ) : null | string
getResultPrice ( ) : float
getSpecial ( ) : string
getSpecialList ( ) : array
getStatusList ( ) : array
getStatusTitle ( ) : string
getTitle ( ) : string
getTypeAttributes ( ) : array
getTypesAttributesValues ( ) : array
getVariants ( ) : ProductVariant[]
getVariantsGroup ( ) : array
getVariantsOptions ( ) : array Функция для подготовки специфичных настроек элементов option в select при выводе вариантов, которые будут использоваться в js при работе с вариантами
hasDiscount ( ) : boolean
isInStock ( ) : integer
isSpecial ( ) : integer
link ( $product, null $type_id = null ) : boolean Связывает продукты
model ( string $className = __CLASS__ ) : Product Returns the static model of the specified AR class.
relations ( ) : array
rules ( ) : array
saveCategories ( array $categoriesId ) : boolean Устанавливает дополнительные категории товара
saveData ( array $attributes, array $typeAttributes, array $variants, array $categories = [] ) : boolean
saveTypeAttributes ( array $attributes ) : boolean
scopes ( ) : array
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
setEmptyQuantity ( )
setTypeAttributes ( array $attributes )
tableName ( ) : string

보호된 메소드들

메소드 설명
loadAttributes ( )

비공개 메소드들

메소드 설명
saveVariants ( array $variants ) : boolean

메소드 상세

attribute() 공개 메소드

public attribute ( $attribute, null $default = null ) : boolean | float | integer | null | string | array
$attribute
$default null
리턴 boolean | float | integer | null | string | array

attributeDescriptions() 공개 메소드

public attributeDescriptions ( ) : array
리턴 array customized attribute descriptions (name=>description)

attributeFile() 공개 메소드

public attributeFile ( $attribute ) : string
$attribute
리턴 string

attributeLabels() 공개 메소드

public attributeLabels ( ) : array
리턴 array customized attribute labels (name=>label)

attributes() 공개 메소드

public attributes ( )

beforeDelete() 공개 메소드

public beforeDelete ( ) : boolean
리턴 boolean

beforeValidate() 공개 메소드

public beforeValidate ( ) : boolean
리턴 boolean

behaviors() 공개 메소드

public behaviors ( ) : array
리턴 array

copy() 공개 메소드

public copy ( ) : null | Product
리턴 null | Product

getAttributeGroups() 공개 메소드

public getAttributeGroups ( ) : array
리턴 array

getBasePrice() 공개 메소드

public getBasePrice ( ) : float
리턴 float

getCategoriesId() 공개 메소드

public getCategoriesId ( ) : mixed
리턴 mixed

getCategoryId() 공개 메소드

public getCategoryId ( ) : null | string
리턴 null | string

getDiscountPrice() 공개 메소드

public getDiscountPrice ( ) : float
리턴 float

getId() 공개 메소드

public getId ( ) : mixed
리턴 mixed id

getImageAlt() 공개 메소드

Get image alt tag text
public getImageAlt ( ) : string
리턴 string

getImageTitle() 공개 메소드

Get image title tag text
public getImageTitle ( ) : string
리턴 string

getImages() 공개 메소드

public getImages ( ) : ProductImage[]
리턴 ProductImage[]

getInStockList() 공개 메소드

public getInStockList ( ) : array
리턴 array

getLinkedProducts() 공개 메소드

Список связанных с продуктом продуктов
public getLinkedProducts ( null | string $typeCode = null ) : Product[]
$typeCode null | string
리턴 Product[]

getLinkedProductsCriteria() 공개 메소드

public getLinkedProductsCriteria ( null | string $typeCode = null ) : CDbCriteria
$typeCode null | string
리턴 CDbCriteria

getLinkedProductsDataProvider() 공개 메소드

public getLinkedProductsDataProvider ( null | string $typeCode = null ) : CActiveDataProvider
$typeCode null | string
리턴 CActiveDataProvider

getMetaCanonical() 공개 메소드

Get canonical url
public getMetaCanonical ( ) : string
리턴 string

getMetaDescription() 공개 메소드

public getMetaDescription ( ) : string
리턴 string

getMetaKeywords() 공개 메소드

public getMetaKeywords ( ) : string
리턴 string

getMetaTitle() 공개 메소드

public getMetaTitle ( ) : string
리턴 string

getName() 공개 메소드

public getName ( ) : string
리턴 string

getPrice() 공개 메소드

public getPrice ( array $variantsIds = [] ) : float | mixed
$variantsIds array
리턴 float | mixed

getProducerName() 공개 메소드

public getProducerName ( ) : null | string
리턴 null | string

getResultPrice() 공개 메소드

public getResultPrice ( ) : float
리턴 float

getSpecial() 공개 메소드

public getSpecial ( ) : string
리턴 string

getSpecialList() 공개 메소드

public getSpecialList ( ) : array
리턴 array

getStatusList() 공개 메소드

public getStatusList ( ) : array
리턴 array

getStatusTitle() 공개 메소드

public getStatusTitle ( ) : string
리턴 string

getTitle() 공개 메소드

public getTitle ( ) : string
리턴 string

getTypeAttributes() 공개 메소드

public getTypeAttributes ( ) : array
리턴 array

getTypesAttributesValues() 공개 메소드

public getTypesAttributesValues ( ) : array
리턴 array

getVariants() 공개 메소드

public getVariants ( ) : ProductVariant[]
리턴 ProductVariant[]

getVariantsGroup() 공개 메소드

public getVariantsGroup ( ) : array
리턴 array

getVariantsOptions() 공개 메소드

Функция для подготовки специфичных настроек элементов option в select при выводе вариантов, которые будут использоваться в js при работе с вариантами
public getVariantsOptions ( ) : array
리턴 array

hasDiscount() 공개 메소드

public hasDiscount ( ) : boolean
리턴 boolean

isInStock() 공개 메소드

public isInStock ( ) : integer
리턴 integer

isSpecial() 공개 메소드

public isSpecial ( ) : integer
리턴 integer

loadAttributes() 보호된 메소드

protected loadAttributes ( )

model() 공개 정적인 메소드

Returns the static model of the specified AR class.
public static model ( string $className = __CLASS__ ) : Product
$className string active record class name.
리턴 Product Static model class

relations() 공개 메소드

public relations ( ) : array
리턴 array relational rules.

rules() 공개 메소드

public rules ( ) : array
리턴 array validation rules for model attributes.

saveCategories() 공개 메소드

Устанавливает дополнительные категории товара
public saveCategories ( array $categoriesId ) : boolean
$categoriesId array - список id категорий
리턴 boolean

saveData() 공개 메소드

public saveData ( array $attributes, array $typeAttributes, array $variants, array $categories = [] ) : boolean
$attributes array
$typeAttributes array
$variants array
$categories array
리턴 boolean

saveTypeAttributes() 공개 메소드

public saveTypeAttributes ( array $attributes ) : boolean
$attributes array
리턴 boolean

scopes() 공개 메소드

public scopes ( ) : array
리턴 array

setEmptyQuantity() 공개 메소드

public setEmptyQuantity ( )

setTypeAttributes() 공개 메소드

public setTypeAttributes ( array $attributes )
$attributes array

tableName() 공개 메소드

public tableName ( ) : string
리턴 string the associated database table name

프로퍼티 상세

$_attributesValues 보호되어 있는 프로퍼티

protected array $_attributesValues
리턴 array

$_typeAttributes 보호되어 있는 프로퍼티

protected $_typeAttributes

$_variantsOptions 보호되어 있는 프로퍼티

кеш getVariantsOptions
protected $_variantsOptions

$selectedVariants 공개적으로 프로퍼티

public array $selectedVariants
리턴 array