N°5619 - hide newsroom menu when no provider

This commit is contained in:
denis.flaven@combodo.com
2022-11-14 18:37:20 +01:00
committed by Denis
parent c6e4466c53
commit 40e24c25a2
2 changed files with 11 additions and 1 deletions

View File

@@ -49,6 +49,16 @@ class NewsroomMenuFactory
return $oMenu;
}
/**
* Check if there is any Newsroom provider configured
* @return boolean
*/
public static function HasProviders()
{
$aProviders = MetaModel::EnumPlugins('iNewsroomProvider');
return count($aProviders) > 0;
}
/**
* Prepare parameters for the newsroom JS widget
*