JCategoryNode/ construct
From Joomla! Documentation
< API15:JCategoryNodeRevision as of 16:52, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Class constructor
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
<...)
Revision as of 16:52, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Class constructor
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
<...)
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Class constructor
Template:Description:JCategoryNode/ construct
Syntax[edit]
__construct($category=null)
Parameter Name | Default Value | Description |
---|---|---|
$category | null |
Returns[edit]
unknown_type
Defined in[edit]
libraries/joomla/application/categories.php
Importing[edit]
jimport( 'joomla.application.categories' );
Source Body[edit]
public function __construct($category = null)
{
if ($category)
{
$this->setProperties($category);
if ($this->parent_id > 0)
{
$categoryTree = JCategories::getInstance($this->extension);
$parentNode = &$categoryTree->get($this->parent_id);
$parentNode->addChild($this);
}
return true;
}
return false;
}
[Edit See Also] Template:SeeAlso:JCategoryNode/ construct
Examples[edit]
<CodeExamplesForm />