/**
* Method to get the parent asset under which to register this one.
* By default, all assets are registered to the ROOT node with ID,
* which will default to 1 if none exists.
* The extended class can define a table and id to lookup. If the
* asset does not exist it will be created.
*
* @param Table $table A Table object for the asset parent.
* @param integer $id Id to look up
*
* @return integer
*
* @since 3.6
*/
protected function _getAssetParentId(Table $table = null, $id = null)
{
$assetId = null;
$asset = Table::getInstance('asset');
if ($asset->loadByName('com_menus')) {
$assetId = $asset->id;
}
return $assetId === null ? parent::_getAssetParentId($table, $id) : $assetId;
}