Base class for Contenido_Category, Contenido_Categories, Contenido_Category_Language.
version |
0.9.0 |
author |
Rudi Bieller |
copyright |
four for business AG <www.4fb.de>
{@internal
created 2008-02-15
}} |
Methods
Constructor
__construct(DB_Contenido $oDb, array $aCfg, int $iClient, int $iLang) : void
Parameters
$aCfg
array
$iClient
int
$iLang
int
Return array with article-objects of a category.
getArticlesInCategory(int $iCategoryId, string $sOrderBy, string $sOrder, boolean $bArticleIdAsKey, int $iOnlineStatus) : array
Parameters
$iCategoryId
int
$sOrderBy
string
$sOrder
string
$bArticleIdAsKey
boolean
$iOnlineStatus
int
0-offline, 1-online, 2-both
Exceptions
Returns
array
An array with Article objects
Return array with article-objects of a category range.
getArticlesInCategoryRange(array $aCategoryIds, string $sOrderBy, string $sOrder, boolean $bArticleIdAsKey, int $iOnlineStatus) : array
Parameters
$aCategoryIds
array
$sOrderBy
string
$sOrder
string
$bArticleIdAsKey
boolean
$iOnlineStatus
int
0-offline, 1-online, 2-both
Exceptions
\Exception |
In case of a sql query that crashes or wrong parameters |
Returns
array
An array with Article objects
getCategoryByArticleId()
getCategoryByArticleId($iArticleId)
Return non start articles of a given category.
getNonStartArticlesInCategory(int $iCategoryId, string $sOrderBy, string $sOrderDirection, boolean $bArticleIdAsKey) : array
Remember to check for idart: if intval(idart) == 0, given idcat has no start article!
Parameters
$iCategoryId
int
$sOrderBy
string
Valid are fields of tbl. con_art_lang
$sOrderDirection
string
$bArticleIdAsKey
boolean
Returns
array
An array with Article objects if any were found
Return non start articles of a given category range.
getNonStartArticlesInCategoryRange(array $aCategoryIds, string $sOrderBy, string $sOrderDirection, boolean $bArticleIdAsKey) : array
Remember to check for idart: if intval(idart) == 0, given idcat has no start article!
Sortorder is applied to each category and not overall!
Parameters
$aCategoryIds
array
$sOrderBy
string
Valid are fields of tbl. con_art_lang
$sOrderDirection
string
$bArticleIdAsKey
boolean
Returns
array
An array with Article objects if any were found TODO: must be fixed so order by condition is working correctly (works now just by category, not overall)
Return array with article-objects of a category that are offline.
getOfflineArticlesInCategory(int $iCategoryId, string $sOrderBy, string $sOrder, boolean $bArticleIdAsKey) : array
Parameters
$iCategoryId
int
$sOrderBy
string
$sOrder
string
$bArticleIdAsKey
boolean
Exceptions
Returns
array
An array with Article objects
Return array with offline article-objects of a category range.
getOfflineArticlesInCategoryRange(array $aCategoryIds, string $sOrderBy, string $sOrder, boolean $bArticleIdAsKey) : array
Parameters
$aCategoryIds
array
$sOrderBy
string
$sOrder
string
$bArticleIdAsKey
boolean
Exceptions
Returns
array
An array with Article objects
Return array with article-objects of a category that are online.
getOnlineArticlesInCategory(int $iCategoryId, string $sOrderBy, string $sOrder, boolean $bArticleIdAsKey) : array
Parameters
$iCategoryId
int
$sOrderBy
string
$sOrder
string
$bArticleIdAsKey
boolean
Exceptions
Returns
array
An array with Article objects
Return array with online article-objects of a category range.
getOnlineArticlesInCategoryRange(array $aCategoryIds, string $sOrderBy, string $sOrder, boolean $bArticleIdAsKey) : array
Parameters
$aCategoryIds
array
$sOrderBy
string
$sOrder
string
$bArticleIdAsKey
boolean
Exceptions
Returns
array
An array with Article objects
Return start article of a given category.
getStartArticleInCategory(int $iCategoryId) : \obj
Remember to check for idart: if intval(idart) == 0, given idcat has no start article!
Parameters
$iCategoryId
int
Returns
\obj
Article
Return start articles of a given category range.
getStartArticlesInCategoryRange(array $aCategoryIds, boolean $bArticleIdAsKey) : array
Remember to check for idart: if intval(idart) == 0, given idcat has no start article!
Parameters
$aCategoryIds
array
$bArticleIdAsKey
boolean
Returns
array
An array with Article objects if any were found
setClient()
setClient($iClient)
Set internal property for debugging on/off and choose appropriate debug object
setDebug(boolean $bDebug, string $sDebugMode) : void
Inherited
access |
public |
author |
Rudi Bieller |
inherited_from |
\Contenido_Category_Base::setDebug() |
Parameters
$bDebug
boolean
$sDebugMode
string
setLang()
setLang($iLang)
Builds SQL query to be used to fetch articles of one/more category/categories
_buildQuery(string $sCategorySelect, string $sOrderBy, string $sOrder, int $iOnlineStatus) : \unknown
Parameters
$sCategorySelect
string
Must bei either "idcat = 1" or "idcat IN(1,2,3)". Not very beautiful...
$sOrderBy
string
$sOrder
string
$iOnlineStatus
int
Returns
\unknown
Properties
$aCfg
$aCfg : array
Inherited
access |
protected |
inherited_from |
\Contenido_Category_Base::$$aCfg |
$bDbg
$bDbg : boolean
Inherited
access |
protected |
inherited_from |
\Contenido_Category_Base::$$bDbg |
$oArticleCollection
$oArticleCollection
$oDb
$oDb : \obj
Inherited
access |
protected |
inherited_from |
\Contenido_Category_Base::$$oDb |
$oDbg
$oDbg : \obj
Inherited
access |
protected |
inherited_from |
\Contenido_Category_Base::$$oDbg |
$sDbgMode
$sDbgMode : string
Inherited
access |
protected |
inherited_from |
\Contenido_Category_Base::$$sDbgMode |