Bitrix-D7 22.6
 
Загрузка...
Поиск...
Не найдено
Класс DayContext
+ Граф наследования:DayContext:

Открытые члены

 addCounter ($day, $name, $value=null)
 
 addDayCounter ($name, $value)
 
 subDayCounter ($day, $name, $value)
 
 addCurrencyCounter ($name, $value, $currency)
 
 subCurrencyCounter ($day, $name, $value, $currency)
 
 attachEntityItem ($entity, $item)
 
- Открытые члены унаследованные от BaseContext
 addCounter ($day, $name, $value=null)
 
 subCounter ($day, $name, $value=1)
 
 setAttribute ($name, $value=null)
 

Открытые статические члены

static getEntityItemInstance ($entity, $item)
 
static getSiteInstance ($siteId)
 
static getInstance ()
 
static saveInstance ()
 
static getVarName ()
 
static getSiteId ()
 

Дополнительные унаследованные члены

- Открытые атрибуты унаследованные от BaseContext
const EMPTY_CONTEXT_ID = 0
 
- Защищенные члены унаследованные от BaseContext
 save ()
 
- Защищенные данные унаследованные от BaseContext
 $id = null
 
 $attributes = array()
 

Подробное описание

См. определение в файле daycontext.php строка 13

Методы

◆ addCounter()

addCounter (   $day,
  $name,
  $value = null 
)

Add value to counter. If counter not exists set counter to value.

Аргументы
Date$dayCounter date.
string$nameCounter name.
int | float$valueNumber to add.
Возвращает
void

Переопределяет метод предка BaseContext.

См. определение в файле daycontext.php строка 23

◆ addCurrencyCounter()

addCurrencyCounter (   $name,
  $value,
  $currency 
)

Add currency value to counter. If counter not exists set counter to value.

Аргументы
string$nameCounter name.
int | float | string$valueNumeric value.
string$currencyCurrency code (eg: RUB).
Возвращает
void

См. определение в файле daycontext.php строка 112

◆ addDayCounter()

addDayCounter (   $name,
  $value 
)

Add value to counter (once a day per person). If counter not exists set counter to value.

Аргументы
string$nameCounter name.
int | float$valueNumber to add.
Возвращает
void

См. определение в файле daycontext.php строка 56

◆ attachEntityItem()

attachEntityItem (   $entity,
  $item 
)

Attach entity item to context.

Аргументы
string$entityEntity type.
string | int$itemEntity item ID.
Исключения
ArgumentTypeException
Возвращает
void

См. определение в файле daycontext.php строка 139

◆ getEntityItemInstance()

static getEntityItemInstance (   $entity,
  $item 
)
static

Get context of attached entity item.

Аргументы
string$entityEntity type.
string | int$itemEntity item ID.
Возвращает
self

См. определение в файле daycontext.php строка 176

◆ getInstance()

static getInstance ( )
static

Get day context singleton instance.

Возвращает
self

См. определение в файле daycontext.php строка 229

◆ getSiteId()

static getSiteId ( )
static

См. определение в файле daycontext.php строка 345

◆ getSiteInstance()

static getSiteInstance (   $siteId)
static

Returns context for given Site

Аргументы
string$siteIdSite ID.
Возвращает
self

См. определение в файле daycontext.php строка 202

◆ getVarName()

static getVarName ( )
static

См. определение в файле daycontext.php строка 332

◆ saveInstance()

static saveInstance ( )
static

См. определение в файле daycontext.php строка 296

◆ subCurrencyCounter()

subCurrencyCounter (   $day,
  $name,
  $value,
  $currency 
)

Subtraction currency value from counter

Аргументы
Date$day
string$name
int | float$value
string$currency
Возвращает
void

См. определение в файле daycontext.php строка 126

◆ subDayCounter()

subDayCounter (   $day,
  $name,
  $value 
)

Subtraction value from counter. If counter not exists does nothing.

Аргументы
Date$day
string$name
int | float$value
Возвращает
void

См. определение в файле daycontext.php строка 87