overrule to add your own buttons.

@return \Gems_Menu_MenuList
428783
protected function getMenuList()
    {
        $links = $this->menu->getMenuList();

        $links->addParameterSources($this->request, $this->menu->getParameterSource());
        $links->addCurrentParent($this->_('Cancel'));

        if ($this->menuShowSiblings) {
            $links->addCurrentSiblings();
        }

        if ($this->menuShowChildren) {
            $links->addCurrentChildren();
        }

        return $links;
    }
828922
public function addGroup() {
		$nb=sizeof($this->elements);
		$bg=new HtmlButtongroups($this->identifier."-buttongroups-".$nb);
		$this->elements []=$bg;
		return $bg;
	}
1025477
protected function buildButtons()
    {
        // load button position defaults. We could load these into an array however we would still need to provide
        // a failsafe check for each setting so long hand here reduces processing overall
        $saveButtonPosition = Config::get('rapyd.data_edit.button_position.save') != '' ? Config::get('rapyd.data_edit.button_position.save') : 'BL';
        $showButtonPosition = Config::get('rapyd.data_edit.button_position.show') != '' ? Config::get('rapyd.data_edit.button_position.show') : 'TR';
        $modifyButtonPosition = Config::get('rapyd.data_edit.button_position.modify') != '' ? Config::get('rapyd.data_edit.button_position.modify') : 'TR';
        $undoButtonPosition = Config::get('rapyd.data_edit.button_position.undo') != '' ? Config::get('rapyd.data_edit.button_position.undo') : 'TR';
        $deleteButtonPosition = Config::get('rapyd.data_edit.button_position.delete') != '' ? Config::get('rapyd.data_edit.button_position.delete') : 'BL';

        //show
        if ($this->status == "show") {

            $this->link($this->url->replace('show' . $this->cid, 'modify' . $this->cid)->get(), trans('rapyd::rapyd.modify'), $showButtonPosition);

        }

        //modify
        if ($this->status == "modify") {
            if (in_array('update',$this->back_on)) {
                $this->link($this->back_url, trans('rapyd::rapyd.undo'), $undoButtonPosition);
            } else {
                $this->link($this->url->replace('modify' . $this->cid, 'show' . $this->cid)->replace('update' . $this->cid, 'show' . $this->cid)->get(), trans('rapyd::rapyd.undo'), $modifyButtonPosition);
            }

            $this->submit(trans('rapyd::rapyd.save'), $saveButtonPosition);
        }
        //crete
        if ($this->status == "create" && $this->action!= 'delete') {
            $this->submit(trans('rapyd::rapyd.save'), $saveButtonPosition);
        }
        //delete
        if ($this->status == "delete") {
            if (in_array('do_delete',$this->back_on)) {
                $this->link($this->back_url, trans('rapyd::rapyd.undo'), $undoButtonPosition);
            } else {
                $this->link($this->url->replace('delete' . $this->cid, 'show' . $this->cid)->replace('do_delete' . $this->cid, 'show' . $this->cid)->get(), trans('rapyd::rapyd.undo'), $deleteButtonPosition);
            }

            $do_delete_url = $this->url->replace('delete' . $this->cid, 'do_delete' . $this->cid)->get();
            $this->formButton($do_delete_url, 'delete', trans('rapyd::rapyd.delete'), $deleteButtonPosition);
        }
    }
656424
protected function createComponentMenu(): Menu
	{
		$moduleMenu = $this->menuFactory->create();
		$moduleMenu->setTranslator($this->translator);
		$moduleMenu->setBaseUrl('cms.title', ":{$this->module}:Homepage:");
		return $moduleMenu;
	}
13985
def edit
      @menu = Menu.find(params[:id])

      # add breadcrumb and set title
      add_breadcrumb I18n.t("controllers.admin.menus.edit.breadcrumb", menu_name: @menu.name)
      set_title(I18n.t("controllers.admin.menus.edit.title", menu_name: @menu.name))
    end
910711
protected function addButtons(\Gems_Menu_MenuList $menuList)
    {
        $menuList->addByController('respondent', 'show', $this->_('Show respondent'))
                ->addByController('track', 'index', $this->_('Show tracks'))
                ->addByController('track', 'show-track', $this->_('Show track'))
                ->addByController('track', 'show', $this->_('Show token'))
                ->addCurrentSiblings()
                ->addCurrentChildren();
    }
135530
public function addToolbarCommands()
    {
        $entity = $this->getController()->getItem();

        if ($entity->authorize('vote')) {
            $this->addCommand('vote');
        }

        if ($entity->authorize('subscribe') || ($entity->isSubscribable() && $entity->subscribed(get_viewer()))) {
            $this->addCommand('subscribe');
        }

        if ($entity->authorize('edit')) {
            $this->addCommand('edit');
        }

        if ($entity->isOwnable() && $entity->owner->authorize('administration')) {
            $this->addAdministrationCommands();
        }

        if ($entity->authorize('delete')) {
            $this->addCommand('delete');
        }
    }
1310207
public function menuLinkPanels()
    {
        $this->getAllMenuLinkRoutes();
        $models = File::files(base_path('app/Models'));
        $panels = [];
        foreach($models as $file){
            $modelName = str_replace('.php', '', $file->getFileName()); // extract model name
            $modelClass ='App\\Models\\'.$modelName;

            if(method_exists($modelClass, 'menuLinkPanel')) {
                $menuPanels = $modelClass::menuLinkPanel();
                // handle one dimension menuLinkRoutes
                if(isset($menuPanels['items'])) {
                    $menuPanels['routes'] = $this->getMenuLinkRoutes($menuPanels['controller'], (isset($menuPanels['belongsTo']) ? $menuPanels['belongsTo'] : ''));
                    $panels[] = $menuPanels;
                }else{
                    foreach($menuPanels as $panelKey=>$panel){
                        $panel['routes'] = $this->getMenuLinkRoutes($panel['controller'], (isset($panel['belongsTo']) ? $panel['belongsTo'] : ''));
                        $panels[] = $panel;
                    }
                }
            }
        }
        return $panels;
    }
1091934
protected function _getFormSubmitExtraButtons()
    {
        $action = $this->_action();
        $buttons = $action->getConfig('scaffold.form_submit_extra_buttons');

        if ($buttons === false) {
            return [];
        }

        if ($buttons === null || $buttons === true) {
            $buttons = $this->_getDefaultExtraButtons();
        }

        return $buttons;
    }
1260939
public function actionAdd ()
		{

			$menu = new Menu();
			$this->_tpl = '@menuViews/add';
			$this->setTitle(Yii::tr('Add menu item', [], 'menu'));
			$type = MenuType::findOne(Yii::$app->request->get('type'));
			if ($type == null)
				return;
			$root = null;
			$parentId = Yii::$app->request->get('parentID');
			if (!is_null($parentId))
			{
				$root = Menu::findOne([ 'id' => $parentId, 'typeID' => $type->id ]);
				$this->setTitle(Yii::tr('Add menu subitem to {title}', [ 'title' => $root->title ], 'menu'));
			}

			if (Yii::$app->request->isPost)
			{
				$post = Yii::$app->request->post('Menu');

				if (is_null($root))
				{
					$root = Menu::findOne([ 'title' => $type->guid . '_ROOT', 'typeID' => $type->id ]);
					if ($root == null)
					{
						$root = new Menu([ 'title' => $type->guid . '_ROOT', 'typeID' => $type->id ]);
						$root->makeRoot();
					}
				}

				$menu->setAttributes([
					'title'  => $post[ 'title' ],
					'url'    => $post[ 'url' ],
					'path'   => $post[ 'path' ],
					'typeID' => $type->id
				]);

				$menu->appendTo($root);
				Yii::$app->notification->messageToSession(Yii::tr('Menu item was saved.', [], 'menu'));
				$this->redirect(Url::toRoute([ '/menu/index', 'type' => $type->id ]));
			}
			$this->data('model', $menu);
		}
716393
protected function addCancelButton()
    {
        $cancelUrl  = [
            $this->request->getControllerKey() => $this->request->getControllerName(),
            $this->request->getActionKey()     => $this->request->getActionName(),
            $this->resetParam                  => 1,
        ];

        $element = $this->_form->createElement('html', 'reset');
        $element->setLabel(html_entity_decode('&nbsp;'));
        $element->setValue(\Gems_Html::actionLink($cancelUrl, $this->_('Cancel login')));
        $this->_form->addElement($element);
    }
182547
public function addButtons(array $buttons): self
    {
        foreach ($buttons as $button) {
            if ($button instanceof ElementButton) {
                $this->buttons[] = $button->toArray();
            }
        }

        return $this;
    }
595989
public function menu()
    {
        if (!empty($this->menu)) {
            return $this->menu;
        }

        $menuModel = config('admin.database.menu_model');

        return $this->menu = (new $menuModel())->toTree();
    }
250332
private function add_menu_action() {
            if ( $this->is_activation_mode() ) {
                if ( $this->is_plugin() || ( $this->has_settings_menu() && ! $this->is_free_wp_org_theme() ) ) {
                    $this->override_plugin_menu_with_activation();
                } else {
                    /**
                     * Handle theme opt-in when the opt-in form shows as a dialog box in the themes page.
                     */
                    if ( fs_request_is_action( $this->get_unique_affix() . '_activate_existing' ) ) {
                        add_action( 'load-themes.php', array( &$this, '_install_with_current_user' ) );
                    } else if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ||
                                fs_request_get_bool( 'pending_activation' )
                    ) {
                        add_action( 'load-themes.php', array( &$this, '_install_with_new_user' ) );
                    }
                }
            } else {
                if ( ! $this->is_registered() ) {
                    // If not registered try to install user.
                    if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ) {
                        $this->_install_with_new_user();
                    }
                } else if (
                    fs_request_is_action( 'sync_user' ) &&
                    ( ! $this->has_settings_menu() || $this->is_free_wp_org_theme() )
                ) {
                    $this->_handle_account_user_sync();
                }
            }
        }
214878
protected function initDefaultButtons()
    {
        $controller = $this->getCompatibilityId();
        if(\Yii::$app->user->checkAccess('read::' . $controller)) {
            if (!isset($this->buttons['view'])) {
                $this->buttons['view'] = function ($url, $model) {
                    return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $url, [
                        'title' => Yii::t('yii', 'View'),
                        'class' => 'btn btn-xs btn-primary hidden-xs button-status-deactivate',
                        'data-pjax' => '0',
                    ]);
                };
            }
        }
        if(\Yii::$app->user->checkAccess('update::' . $controller)) {
            if (!isset($this->buttons['status'])) {
                $this->buttons['status'] = function ($url, $model) {
                    if($model->status == 'active') 
                        return Html::a('<span class="glyphicon glyphicon-remove"></span>', $url,  [
                            'title' => Yii::t('yii', 'Deactivate'),
                            'onclick' => 'javascript: if(confirm("Are you sure you want to deactivate this item?")) myGrid.status($(this)); return false;',
                            'class' => 'btn btn-xs btn-warning hidden-xs button-status-deactivate',
                            'data-pjax' => '0',
                        ]);
                    else 
                        return Html::a('<span class="glyphicon glyphicon-ok"></span>', $url,  [
                            'title' => Yii::t('yii', 'Activate'),
                            'onclick' => 'javascript: if(confirm("Are you sure you want to activate this item?")) myGrid.status($(this)); return false;',
                            'class' => 'btn btn-xs btn-success hidden-xs button-status-activate',
                            'data-pjax' => '0',
                        ]);
                };
            }        
            if (!isset($this->buttons['update'])) {
                $this->buttons['update'] = function ($url, $model) {
                    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
                        'title' => Yii::t('yii', 'Update'),
                        'class' => 'btn btn-xs btn-default',
                        'data-pjax' => '0',
                    ]);
                };
            }
        }
        if(\Yii::$app->user->checkAccess('delete::' . $controller)) {
            if (!isset($this->buttons['delete'])) {
                $this->buttons['delete'] = function ($url, $model) {
                    return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
                        'title' => Yii::t('yii', 'Delete'),
                        'onclick' => 'javascript: if(confirm("Are you sure you want to delete this item?")) myGrid.status($(this)); return false;',
                        'class' => 'btn btn-xs btn-danger button-delete',
                        'data-pjax' => '0',
                    ]);
                };
            }
        }
    }
155513
private function override_plugin_menu_with_activation() {
            $this->_logger->entrance();

            $hook = false;

            if ( ! $this->has_settings_menu() ) {
                // Add the opt-in page without a menu item.
                $hook = FS_Admin_Menu_Manager::add_subpage(
                    null,
                    $this->get_plugin_name(),
                    $this->get_plugin_name(),
                    'manage_options',
                    $this->_slug,
                    array( &$this, '_connect_page_render' )
                );
            } else if ( $this->_menu->is_top_level() ) {
                if ( $this->_menu->is_override_exact() ) {
                    // Make sure the current page is matching the activation page.
                    if ( ! $this->is_matching_url( $this->get_activation_url() ) ) {
                        return;
                    }
                }

                $hook = $this->_menu->override_menu_item( array( &$this, '_connect_page_render' ) );

                if ( false === $hook ) {
                    // Create new menu item just for the opt-in.
                    $hook = FS_Admin_Menu_Manager::add_page(
                        $this->get_plugin_name(),
                        $this->get_plugin_name(),
                        'manage_options',
                        $this->_menu->get_slug(),
                        array( &$this, '_connect_page_render' )
                    );
                }
            } else {
                $menus = array( $this->_menu->get_parent_slug() );

                if ( $this->_menu->is_override_exact() ) {
                    // Make sure the current page is matching the activation page.
                    if ( ! $this->is_matching_url( $this->get_activation_url() ) ) {
                        return;
                    }
                }

                foreach ( $menus as $parent_slug ) {
                    $hook = $this->_menu->override_submenu_action(
                        $parent_slug,
                        $this->_menu->get_raw_slug(),
                        array( &$this, '_connect_page_render' )
                    );

                    if ( false !== $hook ) {
                        // Found plugin's submenu item.
                        break;
                    }
                }
            }

            if ( $this->is_activation_page() ) {
                // Clean admin page from distracting content.
                self::_clean_admin_content_section();
            }

            if ( false !== $hook ) {
                if ( fs_request_is_action( $this->get_unique_affix() . '_activate_existing' ) ) {
                    $this->_install_with_current_user();
                } else if ( fs_request_is_action( $this->get_unique_affix() . '_activate_new' ) ) {
                    $this->_install_with_new_user();
                }
            }
        }
429079
public function requireDefaultRecords()
    {
        parent::requireDefaultRecords();
        $default_menu_sets = $this->config()->get('sets') ?: array();
        foreach ($default_menu_sets as $slug => $options) {
            if (is_array($options)) {
                $title = $options['title'];
                $allowChildren = isset($options['allow_children']) ? $options['allow_children'] : false;
            } else {
                $title = $options;
                $allowChildren = false;
            }
            $slug = Convert::raw2htmlid($slug);
            $record = MenuSet::get()->find('Slug', $slug);
            if (!$record) {
                $record = MenuSet::create();
                DB::alteration_message("Menu '$title' created", 'created');
            } else {
                DB::alteration_message("Menu '$title' updated", 'updated');
            }
            $record->Slug = $slug;
            $record->Title = $title;
            $record->AllowChildren = $allowChildren;
            $record->write();
        }
    }