OXID eShop CE  4.9.10
 All Classes Files Functions Variables Pages
oxMdVariant Class Reference
+ Inheritance diagram for oxMdVariant:
+ Collaboration diagram for oxMdVariant:

Public Member Functions

 setId ($sId)
 getId ()
 setParentId ($sParentId)
 getParentId ()
 setMdSubvariants ($aSubvariants)
 getMdSubvariants ()
 getFirstMdSubvariant ()
 getMdSubvariantByName ($sName)
 getLink ()
 setName ($sName)
 getName ()
 getDPrice ()
 getMinDPrice ()
 getMaxDepth ()
 getFPrice ()
 addNames ($sArtId, $aNames, $dPrice, $sUrl)
 getArticleId ()
 hasArticleId ($sArtId)
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _addMdSubvariant ($oSubvariant)
 _isFixedPrice ()

Protected Attributes

 $_sId
 $_sParentId
 $_sArticleId
 $_sName
 $_sUrl
 $_dPrice = null
 $_sFPrice
 $_aSubvariants = array()

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Defines an element of multidimentional variant name tree structure. Contains article id, variant name, URL, price, price text, and a subset of MD variants.

Definition at line 7 of file oxmdvariant.php.

Member Function Documentation

oxMdVariant::_addMdSubvariant (   $oSubvariant)
protected

Adds one subvariant to subvariant set

Parameters
OxMdVariant$oSubvariantSubvariant

Definition at line 358 of file oxmdvariant.php.

oxMdVariant::_isFixedPrice ( )
protected

Checks if variant price is fixed or not ("from" price)

Returns
bool

Definition at line 368 of file oxmdvariant.php.

oxMdVariant::addNames (   $sArtId,
  $aNames,
  $dPrice,
  $sUrl 
)

Inits MD variant by name. In case $aNames parameter has more than one element addNames recursively adds names for subvariants.

Parameters
string$sArtIdArticle ID
array$aNamesExpected array of $sKey=>$sName pairs.
double$dPricePrice as double
string$sUrlArticle URL

Definition at line 296 of file oxmdvariant.php.

oxMdVariant::getArticleId ( )

Returns corresponding article id or recusively first variant id from subvariant set

Returns
string

Definition at line 319 of file oxmdvariant.php.

oxMdVariant::getDPrice ( )

Returns price

Returns
double

Definition at line 206 of file oxmdvariant.php.

oxMdVariant::getFirstMdSubvariant ( )

Returns first MD subvariant from subvariant set or null in case variant has no subvariants.

Returns
OxMdVariant

Definition at line 131 of file oxmdvariant.php.

oxMdVariant::getFPrice ( )

Returns MD variant price as a text.

Returns
string

Definition at line 262 of file oxmdvariant.php.

oxMdVariant::getId ( )

Returns MD variant identifier

Returns
string

Definition at line 81 of file oxmdvariant.php.

oxMdVariant::getLink ( )

Returns corresponding article URL or recusively first variant URL from subvariant set

Returns
string

Definition at line 171 of file oxmdvariant.php.

oxMdVariant::getMaxDepth ( )

Gets max subvariant depth. 0 means no deeper subvariants.

Returns
int

Definition at line 239 of file oxmdvariant.php.

oxMdVariant::getMdSubvariantByName (   $sName)

Checks for existing MD subvariant by name. Returns existing one or in case $sName has not been found creates an empty OxMdVariant instance.

Parameters
string$sNameSubvariant name
Returns
OxMdVariant

Definition at line 148 of file oxmdvariant.php.

oxMdVariant::getMdSubvariants ( )

Returns full array of subvariants

Returns
array[string]OxMdSubvariants

Definition at line 121 of file oxmdvariant.php.

oxMdVariant::getMinDPrice ( )

Returns min price recursively selected from full subvariant tree.

Returns
double

Definition at line 216 of file oxmdvariant.php.

oxMdVariant::getName ( )

Returns MD variant name

Returns
string

Definition at line 196 of file oxmdvariant.php.

oxMdVariant::getParentId ( )

Returns parent id

Returns
string

Definition at line 101 of file oxmdvariant.php.

oxMdVariant::hasArticleId (   $sArtId)

Checks whether $sArtId is one of subtree article ids.

Parameters
string$sArtIdArticle ID
Returns
bool

Definition at line 337 of file oxmdvariant.php.

oxMdVariant::setId (   $sId)

Sets MD variant identifier

Parameters
string$sIdNew id

Definition at line 71 of file oxmdvariant.php.

oxMdVariant::setMdSubvariants (   $aSubvariants)

Sets MD subvariants

Parameters
oxMdVariant[]$aSubvariants Subvariants

Definition at line 111 of file oxmdvariant.php.

oxMdVariant::setName (   $sName)

Name setter

Parameters
string$sNameNew name

Definition at line 186 of file oxmdvariant.php.

oxMdVariant::setParentId (   $sParentId)

Sets parent id

Parameters
string$sParentIdParent id

Definition at line 91 of file oxmdvariant.php.

Member Data Documentation

oxMdVariant::$_aSubvariants = array()
protected

Definition at line 64 of file oxmdvariant.php.

oxMdVariant::$_dPrice = null
protected

Definition at line 50 of file oxmdvariant.php.

oxMdVariant::$_sArticleId
protected

Definition at line 29 of file oxmdvariant.php.

oxMdVariant::$_sFPrice
protected

Definition at line 57 of file oxmdvariant.php.

oxMdVariant::$_sId
protected

Definition at line 15 of file oxmdvariant.php.

oxMdVariant::$_sName
protected

Definition at line 36 of file oxmdvariant.php.

oxMdVariant::$_sParentId
protected

Definition at line 22 of file oxmdvariant.php.

oxMdVariant::$_sUrl
protected

Definition at line 43 of file oxmdvariant.php.


The documentation for this class was generated from the following file: