PHP Class Product

User: John Kagga Date: 8/1/2015 Time: 9:46 AM
Afficher le fichier Open project: yupe/yupe Class Usage Examples

Méthodes publiques

Свойство Type Description
$selectedVariants array

Protected Properties

Свойство Type Description
$_attributesValues array
$_typeAttributes
$_variantsOptions кеш getVariantsOptions

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
loadAttributes ( )

Private Methods

Méthode Description
saveVariants ( array $variants ) : boolean

Method Details

attribute() public méthode

public attribute ( $attribute, null $default = null ) : boolean | float | integer | null | string | array
$attribute
$default null
Résultat boolean | float | integer | null | string | array

attributeDescriptions() public méthode

public attributeDescriptions ( ) : array
Résultat array customized attribute descriptions (name=>description)

attributeFile() public méthode

public attributeFile ( $attribute ) : string
$attribute
Résultat string

attributeLabels() public méthode

public attributeLabels ( ) : array
Résultat array customized attribute labels (name=>label)

attributes() public méthode

public attributes ( )

beforeDelete() public méthode

public beforeDelete ( ) : boolean
Résultat boolean

beforeValidate() public méthode

public beforeValidate ( ) : boolean
Résultat boolean

behaviors() public méthode

public behaviors ( ) : array
Résultat array

copy() public méthode

public copy ( ) : null | Product
Résultat null | Product

getAttributeGroups() public méthode

public getAttributeGroups ( ) : array
Résultat array

getBasePrice() public méthode

public getBasePrice ( ) : float
Résultat float

getCategoriesId() public méthode

public getCategoriesId ( ) : mixed
Résultat mixed

getCategoryId() public méthode

public getCategoryId ( ) : null | string
Résultat null | string

getDiscountPrice() public méthode

public getDiscountPrice ( ) : float
Résultat float

getId() public méthode

public getId ( ) : mixed
Résultat mixed id

getImageAlt() public méthode

Get image alt tag text
public getImageAlt ( ) : string
Résultat string

getImageTitle() public méthode

Get image title tag text
public getImageTitle ( ) : string
Résultat string

getImages() public méthode

public getImages ( ) : ProductImage[]
Résultat ProductImage[]

getInStockList() public méthode

public getInStockList ( ) : array
Résultat array

getLinkedProducts() public méthode

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

getLinkedProductsCriteria() public méthode

public getLinkedProductsCriteria ( null | string $typeCode = null ) : CDbCriteria
$typeCode null | string
Résultat CDbCriteria

getLinkedProductsDataProvider() public méthode

public getLinkedProductsDataProvider ( null | string $typeCode = null ) : CActiveDataProvider
$typeCode null | string
Résultat CActiveDataProvider

getMetaCanonical() public méthode

Get canonical url
public getMetaCanonical ( ) : string
Résultat string

getMetaDescription() public méthode

public getMetaDescription ( ) : string
Résultat string

getMetaKeywords() public méthode

public getMetaKeywords ( ) : string
Résultat string

getMetaTitle() public méthode

public getMetaTitle ( ) : string
Résultat string

getName() public méthode

public getName ( ) : string
Résultat string

getPrice() public méthode

public getPrice ( array $variantsIds = [] ) : float | mixed
$variantsIds array
Résultat float | mixed

getProducerName() public méthode

public getProducerName ( ) : null | string
Résultat null | string

getResultPrice() public méthode

public getResultPrice ( ) : float
Résultat float

getSpecial() public méthode

public getSpecial ( ) : string
Résultat string

getSpecialList() public méthode

public getSpecialList ( ) : array
Résultat array

getStatusList() public méthode

public getStatusList ( ) : array
Résultat array

getStatusTitle() public méthode

public getStatusTitle ( ) : string
Résultat string

getTitle() public méthode

public getTitle ( ) : string
Résultat string

getTypeAttributes() public méthode

public getTypeAttributes ( ) : array
Résultat array

getTypesAttributesValues() public méthode

public getTypesAttributesValues ( ) : array
Résultat array

getVariants() public méthode

public getVariants ( ) : ProductVariant[]
Résultat ProductVariant[]

getVariantsGroup() public méthode

public getVariantsGroup ( ) : array
Résultat array

getVariantsOptions() public méthode

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

hasDiscount() public méthode

public hasDiscount ( ) : boolean
Résultat boolean

isInStock() public méthode

public isInStock ( ) : integer
Résultat integer

isSpecial() public méthode

public isSpecial ( ) : integer
Résultat integer

loadAttributes() protected méthode

protected loadAttributes ( )

model() public static méthode

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

relations() public méthode

public relations ( ) : array
Résultat array relational rules.

rules() public méthode

public rules ( ) : array
Résultat array validation rules for model attributes.

saveCategories() public méthode

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

saveData() public méthode

public saveData ( array $attributes, array $typeAttributes, array $variants, array $categories = [] ) : boolean
$attributes array
$typeAttributes array
$variants array
$categories array
Résultat boolean

saveTypeAttributes() public méthode

public saveTypeAttributes ( array $attributes ) : boolean
$attributes array
Résultat boolean

scopes() public méthode

public scopes ( ) : array
Résultat array

setEmptyQuantity() public méthode

public setEmptyQuantity ( )

setTypeAttributes() public méthode

public setTypeAttributes ( array $attributes )
$attributes array

tableName() public méthode

public tableName ( ) : string
Résultat string the associated database table name

Property Details

$_attributesValues protected_oe property

protected array $_attributesValues
Résultat array

$_typeAttributes protected_oe property

protected $_typeAttributes

$_variantsOptions protected_oe property

кеш getVariantsOptions
protected $_variantsOptions

$selectedVariants public_oe property

public array $selectedVariants
Résultat array