Sesha_Entity_StockMapper
extends Horde_Rdo_Mapper
in package
The Sesha_Entity_StockMapper class contains all functions related to handling stock mapping in Sesha.
Copyright 2012-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Tags
Table of Contents
- $_lazyRelationships : array<string|int, mixed>
- Relationships loaded on-demand
- $_table : string
- Inflector doesn't support Horde-style tables yet
- delete() : int
- Deletes a stock item from the backend. $object can be either a primary key, an Rdo_Query object, or a Sesha_Entity_Stock object.
Properties
$_lazyRelationships
Relationships loaded on-demand
protected
array<string|int, mixed>
$_lazyRelationships
= array('categories' => array('type' => Horde_Rdo::MANY_TO_MANY, 'mapper' => 'Sesha_Entity_CategoryMapper', 'through' => 'sesha_inventory_categories'), 'values' => array('type' => Horde_Rdo::ONE_TO_MANY, 'mapper' => 'Sesha_Entity_ValueMapper', 'foreignKey' => 'stock_id'))
Tags
$_table
Inflector doesn't support Horde-style tables yet
protected
string
$_table
= 'sesha_inventory'
Tags
Methods
delete()
Deletes a stock item from the backend. $object can be either a primary key, an Rdo_Query object, or a Sesha_Entity_Stock object.
public
delete(string|Sesha_Entity_Stock|Horde_Rdo_Query $object) : int
This also cleans up attached attributes and categories
Parameters
- $object : string|Sesha_Entity_Stock|Horde_Rdo_Query
-
The Rdo object, Horde_Rdo_Query, or unique id to delete.
Return values
int —Number of objects deleted.