def get_toolbar_plugin_struct(plugins, slot=None, page=None):
 template = None
 if page:
  template = page.template
 modules = get_placeholder_conf('plugin_modules', slot, template, default={})
 names = get_placeholder_conf('plugin_labels', slot, template, default={})
 main_list = []
 for plugin in plugins:
  main_list.append({'value': plugin.value, 'name': names.get(plugin.value, plugin.name), 'module': modules.get(plugin.value, plugin.module)})
 return sorted(main_list, key=operator.itemgetter('module'))

def get_toolbar_plugin_struct ( plugins , slot = None , page = None ) : template = None if page : template = page . template modules = get_placeholder_conf ( 'plugin_modules' , slot , template , default = { } ) names = get_placeholder_conf ( 'plugin_labels' , slot , template , default = { } ) main_list = [ ] for plugin in plugins : main_list . append ( { 'value' : plugin . value , 'name' : names . get ( plugin . value , plugin . name ) , 'module' : modules . get ( plugin . value , plugin . module ) } ) return sorted ( main_list , key = operator . itemgetter ( 'module' ) )
return the list of plugins to render in the toolbar .