JHtmlRules/ getParentAssetId

From Joomla! Documentation

< JHtmlRules(Difference between revisions)
Jump to: navigation, search

Batch1211 (Talk | contribs)
(New page: {{Doxiki:JHtmlRules/_getParentAssetId}})
Newer edit →

Current revision

Contents

Syntax

static JHtmlRules::_getParentAssetId($assetId)
Parameter Name Default Value Description
$assetId

Defined in

libraries/joomla/html/html/rules.php

Importing

jimport( 'joomla.html.html.rules' );

Source Body

        protected static function _getParentAssetId($assetId)
        {
                // Get a database object.
                $db = JFactory::getDBO();
 
                // Get the user groups from the database.
                $db->setQuery(
                        'SELECT parent_id' .
                        ' FROM #__assets' .
                        ' WHERE id = '.(int) $assetId
                );
                return (int) $db->loadResult();
        }
Personal tools