Открытые члены | |
__construct () | |
getOfferTitles ($items) | |
getDocumentPrintForm ($document_id, $document_type) | |
multiDelete ($ids) | |
prepareProductsArray ($items) | |
saveProducts ($products, $document, $document_type) | |
createDocument ($items, $document_type, $warehouse, $date, $applied=0) | |
updateDocument ($items, $warehouse, $date, $id, $applied=0, $document_type=null) | |
saveDocumentFromOrder (Order $order, $items, $applied, $document_type) | |
prepareItemsFromOrder (Order $order) | |
getProductsByDocumentId ($document_id, $orm=null, $archived=false) | |
deleteProductsByDocument ($document_id) | |
getProductsTable ($document_id, $type, $items=null, $archived=false, $disable_edit=false) | |
getAddedItems ($document_id, $type, $items=null, $archived=false) | |
getProduct ($product_id) | |
getProductOffers ($product_id) | |
getMovementApi () | |
createDocumentLinks ($source_id, $source_type, $document_id, $document_type) | |
deleteDocument ($doc_id) | |
getApiForDocumentType ($document_type) | |
getControllerUrlByDocumentType ($document_type, $action, $params) | |
getDocumentTypes () | |
getProductsToAdd () | |
getDocumentTitles () | |
getDocumentsByProduct ($product_id, $offer_id, $warehouse_id, $products_orm=null) | |
Открытые члены унаследованные от EntityList | |
__construct (AbstractObject $orm_element, array $options=[]) | |
setDefaultOrder ($order) | |
getNameField () | |
setNameField ($field) | |
setAliasField ($field) | |
setSortField ($field) | |
setIdField ($field) | |
getIdField () | |
getSiteIdField () | |
setLoadOnDelete ($bool) | |
setSiteContext ($site_id=null) | |
getSiteContext () | |
setMultisite ($bool) | |
isMultisite () | |
resetQueryObject () | |
getCleanQueryObject () | |
queryObj () | |
setQueryObj (\RS\Orm\Request $q) | |
defAlias () | |
setFilter ($key, $value=null, $type= '=', $prefix= 'AND', array $options=[]) | |
clearFilter () | |
getList ($page=null, $page_size=null, $order=null) | |
getListAsArray ($page=0, $page_size=0, $order= '') | |
getListAsResource ($page=0, $page_size=0, $order= '') | |
getPagedList ($page_size) | |
loadAssocList ($key_field, $value=null) | |
getAssocList ($key_field, $value=null) | |
setOrder ($order=null, array $values=null) | |
setGroup ($group=null) | |
getListCount () | |
getFirst () | |
getOneItem ($id) | |
getById ($id, $request=null) | |
getElement () | |
setElement ($object) | |
getElementClass () | |
getNewElement () | |
save ($id=null, array $user_post=[]) | |
addFilterControl (\RS\Html\Filter\Control $filter_control) | |
addTableControl (\RS\Html\Table\Control $table_control) | |
del (array $ids) | |
multiDelete ($ids) | |
getSelectList ($first=[]) | |
multieditFormView ($tpl_path, $formfile, array $addparam=[]) | |
multiUpdate (array $data, $ids=[]) | |
moveElement ($from, $to, $flag,\RS\Orm\Request $extra_expr=null) | |
noWriteRights ($right=DefaultModuleRights::RIGHT_UPDATE) | |
getIdByAlias ($alias_or_id, $alias_field=null) | |
saveRequest ($key) | |
getIdsByRequest (\RS\Orm\Request $request) | |
__set ($name, $value) | |
__get ($name) | |
__isset ($name) | |
__unset ($name) | |
Открытые члены унаследованные от BaseModel | |
addError ($message, $fieldname=null, $form=null) | |
hasError () | |
getErrors () | |
cleanErrors () | |
getDisplayErrors () | |
getErrorsStr () | |
getFormErrors ($form, $separator= ', ') | |
getNonFormErrors ($separator= ', ') | |
exportErrors () | |
importErrors ($data) | |
Открытые статические члены | |
static | getUniq () |
Открытые статические члены унаследованные от EntityList | |
static | getInstance ($key= 'default') |
static | staticSelectList ($first=[]) |
static | getSavedRequest ($key, $default=null) |
Защищенные данные | |
$items_cache = [] | |
Защищенные данные унаследованные от EntityList | |
$default_order | |
$load_on_delete = false | |
$id_field = 'id' | |
$alias_field | |
$sort_field | |
$name_field | |
$site_id_field = 'site_id' | |
$is_multisite = false | |
$site_context | |
$def_table_alias = 'A' | |
$obj | |
$obj_instance | |
$filter_active = false | |
$multiedit_template = '%system%/coreobject/multiedit_form.tpl' | |
$assocPlainList = [] | |
$parsePrefixes = ['&' => 'AND' | |
$cache_alias = [] | |
$options = [] | |
$q | |
Защищенные данные унаследованные от BaseModel | |
$default_error_fieldname = 'Информация' | |
Дополнительные унаследованные члены | |
Поля данных унаследованные от EntityList | |
const | WHERE_CONDITION_VAR = 'where_conditions' |
Поля данных унаследованные от BaseModel | |
$form_fieldname = [] | |
$errors_by_form = [] | |
$errors_non_form = [] | |
$errors = [] | |
Защищенные члены унаследованные от EntityList | |
parseArrayFilter ($filters) | |
filterLike ($key, $value, $type, $prefix, $options) | |
filterIs ($key, $value, $type, $prefix, $options) | |
filterFullText ($key, $value, $type, $prefix, $options) | |
filterIn ($key, $value, $type, $prefix, $options) | |
filterNotin ($key, $value, $type, $prefix, $options) | |
filterDefault ($key, $value, $type, $prefix, $options) | |
setPage ($page, $pageSize) | |
moveArrayUp ($arr) | |
moveArrayDown ($arr) | |
Статические защищенные данные унаследованные от EntityList | |
static | $instance = [] |
__construct | ( | ) |
createDocument | ( | $items, | |
$document_type, | |||
$warehouse, | |||
$date, | |||
$applied = 0 |
|||
) |
Создает документ
array | $items | - Массив с товарами |
string | $document_type | - тип документа |
integer | $warehouse | - Id склада |
string | $date | - Дата |
integer | $applied | - проведен |
createDocumentLinks | ( | $source_id, | |
$source_type, | |||
$document_id, | |||
$document_type | |||
) |
Создать связь документов
integer | $source_id | - id документа источника |
string | $source_type | - id типа документа |
integer | $document_id | - id связанного документа |
string | $document_type | - тип связанного документа |
deleteDocument | ( | $doc_id | ) |
Удалить документ
integer | $doc_id | - id документа |
deleteProductsByDocument | ( | $document_id | ) |
Удаляет товары определенного документа
integer | $document_id | - id документа |
getAddedItems | ( | $document_id, | |
$type, | |||
$items = null , |
|||
$archived = false |
|||
) |
Формирует скрытые элементы input для формы редактирования документа. По этим элементам формируется массив товаров для обработки
integer | $document_id | - Id документа |
$type | string - тип документа | |
$items | array - массив с товарами документа | |
$archived | bool - документ заархивирован? |
getApiForDocumentType | ( | $document_type | ) |
Получить api по типу документа
string | $document_type | - тип документа |
getControllerUrlByDocumentType | ( | $document_type, | |
$action, | |||
$params | |||
) |
Получить контроллер по типу документа
string | $document_type | - тип документа |
string | $action | - action контроллера |
array | $params | - параметры |
getDocumentPrintForm | ( | $document_id, | |
$document_type | |||
) |
Получить форму документа для печати
int | $document_id | |
string | $document_type |
getDocumentsByProduct | ( | $product_id, | |
$offer_id, | |||
$warehouse_id, | |||
$products_orm = null |
|||
) |
Получить документы, в которых состоит товар
integer | $product_id | - id товара |
integer | $offer_id | - id комплектации |
integer | $warehouse_id | - id склада |
products_orm | - из какой таблицы брать товары |
getDocumentTitles | ( | ) |
Получить массив с названиями типов документов
getDocumentTypes | ( | ) |
Получить типы документов
getMovementApi | ( | ) |
Получить api перемещения
getOfferTitles | ( | $items | ) |
Получить названия комплектаций
$items |
getProduct | ( | $product_id | ) |
getProductOffers | ( | $product_id | ) |
Возвращает массив комплектаций определенного товара
integer | $product_id | - Id товара |
getProductsByDocumentId | ( | $document_id, | |
$orm = null , |
|||
$archived = false |
|||
) |
Возвращает массив товаров, принадлежащих определенному документу
integer | $document_id | - Id документа |
$orm | DocumentProducts|DocumentProductsArchive - orm архива или товаров | |
$archived | bool - заархивирован? |
getProductsTable | ( | $document_id, | |
$type, | |||
$items = null , |
|||
$archived = false , |
|||
$disable_edit = false |
|||
) |
Формирует шаблон с таблицей товаров документа дял поля "products"
integer | $document_id | - Id документа |
$type | string - тип документа | |
$items | array - массив с товарами документа | |
$archived | bool - документ заархивирован? |
getProductsToAdd | ( | ) |
Возвращает ID Товаров и ID компоектаций добавленных в документ товаров
|
static |
Получить уникальный id для товара
multiDelete | ( | $ids | ) |
Не позволяем удалить документы, у которых есть связи
array | $ids | - массив со списком id объектов |
prepareItemsFromOrder | ( | Order | $order | ) |
Подготавливает массив товаров для сохранения в документе
\Shop\Model\Orm\Order | $order | - объект заказа |
prepareProductsArray | ( | $items | ) |
Подготавливает массив товаров, приходящий из POST
array | $items | - массив items, приходящий из POST запросы формы документа |
saveDocumentFromOrder | ( | Order | $order, |
$items, | |||
$applied, | |||
$document_type | |||
) |
Сохраняет связанный документ заказа
\Shop\Model\Orm\Order | $order | - объект заказа |
array | $items | - подготовленный массив товаров для сохранения |
integer | $applied | - документ проведен? |
string | $document_type | - тип документа |
saveProducts | ( | $products, | |
$document, | |||
$document_type | |||
) |
Сохраняет товары документа
array | $products | - Массив с товарами |
\Catalog\Model\Orm\Inventory\Document | $document | - объект документа, которому принадлежат товары |
integer | $document_type | - тип документа |
updateDocument | ( | $items, | |
$warehouse, | |||
$date, | |||
$id, | |||
$applied = 0 , |
|||
$document_type = null |
|||
) |
Обновляет существующий документ
array | $items | - Массив с товарами |
integer | $warehouse | - Id склада |
integer | $id | - Id |
integer | $applied | - проведен |
string | $date | - Дата |
string | $document_type | - тип документа |
|
protected |