def get_plugin_toolbar_js(self, plugin, page=None): placeholder_cache = self._rendered_plugins_by_placeholder.setdefault(plugin.placeholder_id, {}) child_classes, parent_classes = get_plugin_restrictions( plugin=plugin, page=page, restrictions_cache=placeholder_cache, ) content = get_plugin_toolbar_js( plugin, children=child_classes, parents=parent_classes, ) return content
def collect_plugin_data(plugin): child_classes, parent_classes = get_plugin_restrictions( plugin=plugin, page=host_page, restrictions_cache=restrictions, ) plugin_info = get_plugin_info( plugin, children=child_classes, parents=parent_classes, ) tree_data.append(plugin_info) for plugin in plugin.child_plugin_instances or []: collect_plugin_data(plugin)