Adds a view or menu to the backend, model view_menu
            param name:
                name of the view menu to add
486165
def add_view_menu(self, name):
        
        view_menu = self.find_view_menu(name)
        if view_menu is None:
            try:
                view_menu = self.viewmenu_model()
                view_menu.name = name
                self.get_session.add(view_menu)
                self.get_session.commit()
                return view_menu
            except Exception as e:
                log.error(c.LOGMSG_ERR_SEC_ADD_VIEWMENU.format(str(e)))
                self.get_session.rollback()
        return view_menu
1281938
public void setMenuView(View view, LayoutParams params) {
        mMenuView = view;
        mMenuContainer.removeAllViews();
        mMenuContainer.addView(view, params);
    }
1137082
def add_view_info(self, view_info: ViewInfo):
        ''''''
        try:
            next(info for info in self._view_infos if info.view == view_info.view)
        except StopIteration:
            indent = len(self._view_infos) * '\t'
            self._view_infos.append(view_info)
            info = 'Line {0} in "{1}"'.format(view_info.line, view_info.view)
            self.add_info(indent + 'View info', info)
232947
def create_view_for_template(app_name, template_name):
    '''
    
    '''
    # ensure the template exists
    apps.get_app_config('django_mako_plus').engine.get_template_loader(app_name).get_template(template_name)
    # create the view function
    def template_view(request, *args, **kwargs):
        # not caching the template object (getting it each time) because Mako has its own cache
        dmp = apps.get_app_config('django_mako_plus')
        template = dmp.engine.get_template_loader(app_name).get_template(template_name)
        return template.render_to_response(request=request, context=kwargs)
    template_view.view_type = 'template'
    return template_view
154692
def find_permission_view_menu(self, permission_name, view_menu_name):
        
        permission = self.find_permission(permission_name)
        view_menu = self.find_view_menu(view_menu_name)
        if permission and view_menu:
            return (
                self.get_session.query(self.permissionview_model)
                .filter_by(permission=permission, view_menu=view_menu)
                .first()
            )
402698
function(backend, name, options) {
        options = _.extend({keyPath: 'id'}, options || {});
        this.options = options;

        this.backend = backend;
        this.name = name;
        this.keyPath = this.options.keyPath;
    }
1121754
def render_or_default(name, args = {})
      render name, args
    rescue ActionView::MissingTemplate
      render args.merge(:template => "#{self.class.default_views}/#{name}", :prefix => '')
    end
918525
def addHelpMenu(menuName, parentMenuFunction=None):
    '''
    
    '''

    parentMenuFunction = parentMenuFunction or iface.addPluginToMenu
    namespace = _callerName().split(".")[0]
    path = "file://{}".format(os.path.join(os.path.dirname(_callerPath()), "docs",  "html", "index.html"))    
    helpAction = QtWidgets.QAction(QgsApplication.getThemeIcon('/mActionHelpContents.svg'), 
                                    "Plugin help...", iface.mainWindow())
    helpAction.setObjectName(namespace + "help")
    helpAction.triggered.connect(lambda: openHelp(path))
    parentMenuFunction(menuName, helpAction)
    global _helpActions
    _helpActions[menuName] = helpAction
1230779
def add_view(self, path: str, handler: AbstractView,
                 **kwargs: Any) -> AbstractRoute:
        
        return self.add_route(hdrs.METH_ANY, path, handler, **kwargs)
442667
def add_parameter(self, param_name, description=None, default=0, unit=None):
        

        if description is None:
            description = "Parameter called {}".format(param_name)

        if unit is None:
            unit = "-"
        
        name_check = lambda x: x['name'] == param_name
        name_check_list = list(filter(name_check, self.ext_params))
        if len(name_check_list) == 0:
            self.ext_params.append({'name': param_name, 'description': description, 'default': default, 'unit': unit})
        else:
            print('{} already exists - choose a different name'.format(param_name))
611248
def find_view_menu(self, name):
        
        return self.get_session.query(self.viewmenu_model).filter_by(name=name).first()
832981
def _add_view_menu(self):
        
        mainMenu = self.app.mainMenu()

        # Create an View menu and make it a submenu of the main menu
        viewMenu = AppKit.NSMenu.alloc().init()
        viewMenu.setTitle_(localization["cocoa.menu.view"])
        viewMenuItem = AppKit.NSMenuItem.alloc().init()
        viewMenuItem.setSubmenu_(viewMenu)
        mainMenu.addItem_(viewMenuItem)

        # TODO: localization of the Enter fullscreen string has no effect
        fullScreenMenuItem = viewMenu.addItemWithTitle_action_keyEquivalent_(localization["cocoa.menu.fullscreen"], "toggleFullScreen:", "f")
        fullScreenMenuItem.setKeyEquivalentModifierMask_(AppKit.NSControlKeyMask | AppKit.NSCommandKeyMask)
848199
def append_application_menu      
      html = ''
      Roroacms.append_menu.each do |f|
        html += (render :partial => 'roroacms/admin/partials/append_sidebar_menu', :locals => { :menu_block => f })
      end
      html.html_safe
    end
1331868
def add_view(self, request, **kwargs):
        
        try:
            return super(ClonedRepoAdmin, self).add_view(request, **kwargs)
        except ValidationError:
            # Rerender the form, having messaged the user.
            return redirect(request.path)
55283
function View (name) {
  if (!(this instanceof View)) {
    return new View(name);
  }
  this.name = name;
  this.config = utils.clone(config);
  this.config.pathname += '/_view/' + this.name;
}
995536
def add_view(self, *args, **kwargs):
        
        from .viewbox import ViewBox
        view = ViewBox(*args, **kwargs)
        return self.add_widget(view)
1315060
def add(options = {})
      self.options = options

      raise(ArgumentError, 'Mandatory param :name missing') unless options[:name]

      if options[:feature]
        features << options
        SafetyCone::ViewHelpers.add_method(options[:feature])
      else
        paths[make_key] = options
      end
    end