class_docstr: This is the base class for all the framework.
  
  This is where you will register all your views
  and create the menu structure.
  Will hold your flask app object, all your views, and security classes.
  Initialize your application like this for SQLAlchemy::
      from flask import Flask
      from flask_appbuilder import SQLA, AppBuilder
      app = Flask(__name__)
      app.config.from_object('config')
      db = SQLA(app)
      appbuilder = AppBuilder(app, db.session)
  When using MongoEngine::
      from flask import Flask
      from flask_appbuilder import AppBuilder
      from flask_appbuilder.security.mongoengine.manager import SecurityManager
      from flask_mongoengine import MongoEngine
      app = Flask(__name__)
      app.config.from_object('config')
      dbmongo = MongoEngine(app)
      appbuilder = AppBuilder(app)
  You can also create everything as an application factory.
class_docstr_tok: ["This","is","the","base","class","for","all","the","framework",".","This","is","where","you","will","register","all","your","views","and","create","the","menu","structure",".","Will","hold","your","flask","app","object",",","all","your","views",",","and","security","classes",".","Initialize","your","application","like","this","for","SQLAlchemy",":",":","from","flask","import","Flask","from","flask_appbuilder","import","SQLA",",","AppBuilder","app","=","Flask","(","__name__",")","app.config.from_object","(","'config","'",")","db","=","SQLA","(","app",")","appbuilder","=","AppBuilder","(","app",",","db.session",")","When","using","MongoEngine",":",":","from","flask","import","Flask","from","flask_appbuilder","import","AppBuilder","from","flask_appbuilder.security.mongoengine.manager","import","SecurityManager","from","flask_mongoengine","import","MongoEngine","app","=","Flask","(","__name__",")","app.config.from_object","(","'config","'",")","dbmongo","=","MongoEngine","(","app",")","appbuilder","=","AppBuilder","(","app",")","You","can","also","create","everything","as","an","application","factory","."]
docstr: Add your views associated with menus using this method.
  
  :param baseview:
      A BaseView type class instantiated or not.
      This method will instantiate the class for you if needed.
  :param name:
      The string name that identifies the menu.
  :param href:
      Override the generated href for the menu.
      You can use an url string or an endpoint name
      if non provided default_view from view will be set as href.
  :param icon:
      Font-Awesome icon name, optional.
  :param label:
      The label that will be displayed on the menu,
      if absent param name will be used
  :param category:
      The menu category where the menu will be included,
      if non provided the view will be accessible as a top menu.
  :param category_icon:
      Font-Awesome icon name for the category, optional.
  :param category_label:
      The label that will be displayed on the menu,
      if absent param name will be used
  :param menu_cond:
      If a callable, :code:`menu_cond` will be invoked when
      constructing the menu items. If it returns :code:`True`,
      then this link will be a part of the menu. Otherwise, it
      will not be included in the menu items. Defaults to
      :code:`None`, meaning the item will always be present.
  
  Examples::
  
      appbuilder = AppBuilder(app, db)
      # Register a view, rendering a top menu without icon.
      appbuilder.add_view(MyModelView(), "My View")
      # or not instantiated
      appbuilder.add_view(MyModelView, "My View")
      # Register a view, a submenu "Other View" from "Other" with a phone icon.
      appbuilder.add_view(MyOtherModelView, "Other View", icon="fa-phone", category="Others")
      # Register a view, with category icon and translation.
      appbuilder.add_view(
          YetOtherModelView,
          "Other View",
          icon="fa-phone",
          label=_("Other View"),
          category="Others",
          category_icon="fa-envelop",
          category_label=_("Other View"),
      )
      # Register a view whose menu item will be conditionally displayed
      appbuilder.add_view(
          YourFeatureView,
          "Your Feature",
          icon="fa-feature",
          label=_("Your Feature"),
          menu_cond=lambda: is_feature_enabled("your-feature"),
      )
      # Add a link
      appbuilder.add_link("google", href="www.google.com", icon="fa-google-plus")
docstr_tok: ["Add","your","views","associated","with","menus","using","this","method",".",":","param","baseview",":","A","BaseView","type","class","instantiated","or","not",".","This","method","will","instantiate","the","class","for","you","if","needed",".",":","param","name",":","The","string","name","that","identifies","the","menu",".",":","param","href",":","Override","the","generated","href","for","the","menu",".","You","can","use","an","url","string","or","an","endpoint","name","if","non","provided","default_view","from","view","will","be","set","as","href",".",":","param","icon",":","Font-Awesome","icon","name",",","optional",".",":","param","label",":","The","label","that","will","be","displayed","on","the","menu",",","if","absent","param","name","will","be","used",":","param","category",":","The","menu","category","where","the","menu","will","be","included",",","if","non","provided","the","view","will","be","accessible","as","a","top","menu",".",":","param","category_icon",":","Font-Awesome","icon","name","for","the","category",",","optional",".",":","param","category_label",":","The","label","that","will","be","displayed","on","the","menu",",","if","absent","param","name","will","be","used",":","param","menu_cond",":","If","a","callable",",",":","code",":","`","menu_cond","`","will","be","invoked","when","constructing","the","menu","items",".","If","it","returns",":","code",":","`","True","`",",","then","this","link","will","be","a","part","of","the","menu",".","Otherwise",",","it","will","not","be","included","in","the","menu","items",".","Defaults","to",":","code",":","`","None","`",",","meaning","the","item","will","always","be","present",".","Examples",":",":","appbuilder","=","AppBuilder","(","app",",","db",")","#","Register","a","view",",","rendering","a","top","menu","without","icon",".","appbuilder.add_view","(","MyModelView","(",")",",","``","My","View","''",")","#","or","not","instantiated","appbuilder.add_view","(","MyModelView",",","``","My","View","''",")","#","Register","a","view",",","a","submenu","``","Other","View","''","from","``","Other","''","with","a","phone","icon",".","appbuilder.add_view","(","MyOtherModelView",",","``","Other","View","''",",","icon=","''","fa-phone","''",",","category=","''","Others","''",")","#","Register","a","view",",","with","category","icon","and","translation",".","appbuilder.add_view","(","YetOtherModelView",",","``","Other","View","''",",","icon=","''","fa-phone","''",",","label=_","(","``","Other","View","''",")",",","category=","''","Others","''",",","category_icon=","''","fa-envelop","''",",","category_label=_","(","``","Other","View","''",")",",",")","#","Register","a","view","whose","menu","item","will","be","conditionally","displayed","appbuilder.add_view","(","YourFeatureView",",","``","Your","Feature","''",",","icon=","''","fa-feature","''",",","label=_","(","``","Your","Feature","''",")",",","menu_cond=lambda",":","is_feature_enabled","(","``","your-feature","''",")",",",")","#","Add","a","link","appbuilder.add_link","(","``","google","''",",","href=","''","www.google.com","''",",","icon=","''","fa-google-plus","''",")"]
code: def add_view(
      self,
      baseview,
      name,
      href="",
      icon="",
      label="",
      category="",
      category_icon="",
      category_label="",
      menu_cond=None,
  ):
      """Add your views associated with menus using this method.
  
      :param baseview:
          A BaseView type class instantiated or not.
          This method will instantiate the class for you if needed.
      :param name:
          The string name that identifies the menu.
      :param href:
          Override the generated href for the menu.
          You can use an url string or an endpoint name
          if non provided default_view from view will be set as href.
      :param icon:
          Font-Awesome icon name, optional.
      :param label:
          The label that will be displayed on the menu,
          if absent param name will be used
      :param category:
          The menu category where the menu will be included,
          if non provided the view will be accessible as a top menu.
      :param category_icon:
          Font-Awesome icon name for the category, optional.
      :param category_label:
          The label that will be displayed on the menu,
          if absent param name will be used
      :param menu_cond:
          If a callable, :code:`menu_cond` will be invoked when
          constructing the menu items. If it returns :code:`True`,
          then this link will be a part of the menu. Otherwise, it
          will not be included in the menu items. Defaults to
          :code:`None`, meaning the item will always be present.
  
      Examples::
  
          appbuilder = AppBuilder(app, db)
          # Register a view, rendering a top menu without icon.
          appbuilder.add_view(MyModelView(), "My View")
          # or not instantiated
          appbuilder.add_view(MyModelView, "My View")
          # Register a view, a submenu "Other View" from "Other" with a phone icon.
          appbuilder.add_view(MyOtherModelView, "Other View", icon="fa-phone", category="Others")
          # Register a view, with category icon and translation.
          appbuilder.add_view(
              YetOtherModelView,
              "Other View",
              icon="fa-phone",
              label=_("Other View"),
              category="Others",
              category_icon="fa-envelop",
              category_label=_("Other View"),
          )
          # Register a view whose menu item will be conditionally displayed
          appbuilder.add_view(
              YourFeatureView,
              "Your Feature",
              icon="fa-feature",
              label=_("Your Feature"),
              menu_cond=lambda: is_feature_enabled("your-feature"),
          )
          # Add a link
          appbuilder.add_link("google", href="www.google.com", icon="fa-google-plus")
      """
      baseview = self._check_and_init(baseview)
      log.info(
          LOGMSG_INF_FAB_ADD_VIEW, baseview.__class__.__name__, name
      )
  
      if not self._view_exists(baseview):
          baseview.appbuilder = self
          self.baseviews.append(baseview)
          self._process_inner_views()
          if self.app:
              self.register_blueprint(baseview)
              self._add_permission(baseview)
              self.add_limits(baseview)
      self.add_link(
          name=name,
          href=href,
          icon=icon,
          label=label,
          category=category,
          category_icon=category_icon,
          category_label=category_label,
          baseview=baseview,
          cond=menu_cond,
      )
      return baseview
  
imports: from __future__ import annotations
  import logging
  from functools import reduce
  from typing import TYPE_CHECKING
  from flask import Blueprint, current_app, url_for
  from flask_appbuilder import __version__
  from flask_appbuilder.babel.manager import BabelManager
  from flask_appbuilder.const import LOGMSG_ERR_FAB_ADD_PERMISSION_MENU, LOGMSG_ERR_FAB_ADD_PERMISSION_VIEW, LOGMSG_ERR_FAB_ADDON_IMPORT, LOGMSG_ERR_FAB_ADDON_PROCESS, LOGMSG_INF_FAB_ADD_VIEW, LOGMSG_INF_FAB_ADDON_ADDED, LOGMSG_WAR_FAB_VIEW_EXISTS
  from flask_appbuilder.filters import TemplateFilters
  from flask_appbuilder.menu import Menu
  from flask_appbuilder.views import IndexView, UtilView
  from airflow import settings
  from airflow.configuration import conf
  from airflow.www.extensions.init_auth_manager import get_auth_manager, init_auth_manager
label_desc: Use image node_id 18 for calling the AirflowAppBuilder obj's underlying member method code with example usage: obj.add_view(baseview, name, href, icon, label, category, category_icon, category_label, menu_cond) and returns: baseview