Documentation

Shop_Favorite_Controller extends Core_Servant_Properties
in package

Shop_Favorite_Controller

Доступные методы:

  • shop_item_id($id) идентификатор товара
  • siteuser_id($id) идентификатор пользователя сайта
Tags
subpackage

Shop

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$instance  : mixed
The singleton instances.
$_allowedProperties  : array<string|int, mixed>
Allowed object properties
$_propertiesValues  : array<string|int, mixed>
Properties values
$_unlimitedProperties  : bool
Object has unlimited number of properties

Methods

__construct()  : mixed
Constructor.
add()  : Shop_Favorite_Controller
Add item into favorite
addAllowedProperties()  : self
Add additional allowed properties
addAllowedProperty()  : self
Add additional allowed property
clear()  : Shop_Favorite_Controller
Clear favorite operation's options
clearSessionFavorite()  : Shop_Favorite_Controller
Clear session favorite
delete()  : Shop_Favorite_Controller
Delete item from favorite
get()  : object
Get item from favorite
getAll()  : array<string|int, mixed>
Get all goods in the favorite
instance()  : object
Register an existing instance as a singleton.
moveTemporaryFavorite()  : self
Move goods from session to database
set()  : self
Run when writing data to inaccessible properties
setUnlimitedProperties()  : self
Set unlimitedProperties
update()  : Shop_Favorite_Controller
Update item in favorite
_getAllFromDb()  : array<string|int, mixed>
Get all favorites from database
_getAllFromSession()  : array<string|int, mixed>
Get all favorites from session

Properties

$instance

The singleton instances.

public static mixed $instance = \NULL

$_allowedProperties

Allowed object properties

protected array<string|int, mixed> $_allowedProperties = array('shop_item_id', 'siteuser_id', 'shop_favorite_list_id')

$_propertiesValues

Properties values

protected array<string|int, mixed> $_propertiesValues = array()

$_unlimitedProperties

Object has unlimited number of properties

protected bool $_unlimitedProperties = \FALSE

Methods

__construct()

Constructor.

public __construct() : mixed

addAllowedProperties()

Add additional allowed properties

public addAllowedProperties(array<string|int, mixed> $array) : self
Parameters
$array : array<string|int, mixed>

array of properties' names

Return values
self

addAllowedProperty()

Add additional allowed property

public addAllowedProperty(string $property) : self
Parameters
$property : string

property name

Return values
self

get()

Get item from favorite

public get() : object
Tags
hostcms-event

Shop_Favorite_Controller.onBeforeGet

hostcms-event

Shop_Favorite_Controller.onAfterGet

Return values
object

getAll()

Get all goods in the favorite

public getAll(Shop_Model $oShop) : array<string|int, mixed>
Parameters
$oShop : Shop_Model

shop

Return values
array<string|int, mixed>

instance()

Register an existing instance as a singleton.

public static instance() : object
Return values
object

moveTemporaryFavorite()

Move goods from session to database

public moveTemporaryFavorite(Shop_Model $oShop) : self
Parameters
$oShop : Shop_Model

shop

Tags
hostcms-event

Shop_Favorite_Controller.onBeforeMoveTemporaryFavorite

hostcms-event

Shop_Favorite_Controller.onAfterMoveTemporaryFavorite

Return values
self

set()

Run when writing data to inaccessible properties

public set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

setUnlimitedProperties()

Set unlimitedProperties

public setUnlimitedProperties([bool $value = TRUE ]) : self
Parameters
$value : bool = TRUE

default TRUR

Return values
self

_getAllFromDb()

Get all favorites from database

protected _getAllFromDb(Shop_Model $oShop) : array<string|int, mixed>
Parameters
$oShop : Shop_Model

shop

Return values
array<string|int, mixed>

_getAllFromSession()

Get all favorites from session

protected _getAllFromSession(Shop_Model $oShop) : array<string|int, mixed>
Parameters
$oShop : Shop_Model

shop

Return values
array<string|int, mixed>

        
On this page

Search results