Add menu.

@param int   $agentId
@param array $buttons

@return bool
4849
public function add($agentId, array $buttons)
    {
        return $this->parseJSON('json', [self::API_CREATE, ['button' => $buttons], JSON_UNESCAPED_UNICODE, ['agentid' => $agentId]]);
    }
284127
public function addButtonsToLine() {
		$inserts = func_get_args();
		$line = array_shift($inserts);
		if (is_array($inserts[0])) $inserts = $inserts[0];

		foreach ($inserts as $button) {
			$this->buttons[$line][] = $button;
		}
		return $this;
	}
1317105
public function addMenu(string $label, Addon\DropDownMenu $menu, bool $active = false, bool $disabled = false)
    {
        $this->items[] = [
            'label'    => $label, 
            'menu'     => $menu, 
            'active'   => $active, 
            'disabled' => $disabled
        ];
        return $this;
    }
1291763
public function AddAgents($CampaignId, Request\AddAgents $AddAgents = null)
    {
        $uri = $this->getUri('/ccc/%s/agent', array($CampaignId));

        return $this->post($uri, $AddAgents);
    }
511657
public function addMenu($url, $id, $class, $attributes, $menu1, $menu2 = 'geen', $menu3 = 'geen', $menu4 = 'geen', $menu5 = 'geen', $menu6 = 'geen')
    {
        $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['url'] = $url;
        $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['id'] = $id;
        $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['class'] = $class;
        $this->dataMenu[$menu1][$menu2][$menu3][$menu4][$menu5][$menu6]['attrib'] = $attributes;
    }
121166
public function addButtons($buttons)
    {
        // Add a first separator
        array_push($buttons, '|');

        // Iterate on configs
        foreach ($this->configs as $key => $file) {
            if (empty($file) && 'media' !== $key) {
                continue;
            }

            // Update buttons
            array_push($buttons, $key);
        }

        return $buttons;
    }
1039820
public function addButton(Button $button)
    {
        $this->list[] = $button;
        $this->listCount++;
        $this->ulList = false;
        return $this;
    }
1066308
public function addAction(Request $request, $menuid)
    {
        return parent::doAddAction($this->getAdminListConfigurator($request, $menuid), null, $request);
    }
332800
public function setButtons(array $buttons)
    {
        collect($buttons)->map(function ($button) {
            $this->setButton($button);
        });

        return $this;
    }
162328
public void createMenu(int menuId){
        mToolbar.inflateMenu(menuId);
        mMenuDataChanged = true;
        if(mAppCompatDelegate == null)
            onPrepareMenu();
    }
961526
public function cloneMenu(int $menuId, int $siteId, string $name): Tree
    {
        $source = $this->menuStorage->load($menuId);
        $values = [
            'title'       => $source->getTitle(),
            'description' => $source->getDescription(),
            'site_id'     => $siteId,
        ];
        $target = $this->menuStorage->create($name, $values);

        return $this->cloneTreeIn($target->getId(), $this->buildTree($menuId));
    }
1141902
public static function setIdActiveMenu ( $id )
    {
        self::$_idActiveMenu = $id;
        self::$_activeMenu = Menu::find($id);
    }
416996
public function addByController($controller, $action = 'index', $label = null)
    {
        $query['controller'] = $controller;
        $query['action']     = $action;

        if ($menuItem = $this->menu->findFirst($query)) {
            $this->addMenuItem($menuItem, $label);
        }

        return $this;
    }
1362171
private function addDefaultLeftMenu(array &$configuration)
    {
        if (!$this->applicationConfiguration->getParameter('enable_menus')) {
            return;
        }
        $menus = $this->configurationFactory->createResourceMenuConfiguration();

        // Add the resources menu for each action of the admin
        foreach ($configuration['actions'] as $name => $action) {
            if (null === $action) {
                $action = [];
            }

            if (key_exists('menus', $action) && key_exists('left', $action)) {
                continue;
            }

            $configuration['actions'][$name]['menus']['left'] = $menus;
        }
    }
80690
public function addButton($button)
    {
        $buttons = $this->buttons;

        // If buttons isn't an array, set it
        if (!is_array($buttons)) {
            $buttons = array();
        }

        $buttons[] = $button;

        $this->buttons = $buttons;

        return $this;
    }
432220
public function upAction($pageId, $menuName)
    {
        $pageMenuRepo = $this->getDoctrine()->getRepository('FulgurioLightCMSBundle:PageMenu');
        $pageMenu = $pageMenuRepo->findOneBy(array('page' => $pageId, 'label' => $menuName));
        $position = $pageMenu->getPosition();
        if ($position > 1)
        {
            $pageMenuRepo->downMenuPagesPosition($menuName, $position - 1, $position);
            $pageMenu->setPosition($position - 1);
            $em = $this->getDoctrine()->getManager();
            $em->persist($pageMenu);
            $em->flush();
            $this->get('session')->getFlashBag()->add(
                    'notice',
                    $this->get('translator')->trans('fulgurio.lightcms.menus.moving_success_msg', array(), 'admin'));
        }
        return $this->redirect($this->generateUrl('AdminMenus'));
    }
1240098
function add(id, text, title, fn) {
			if (!buttons[id]) {
				var button = renderer.text(
					text,
					0,
					0
				)
				.css(options.toolbar.itemStyle)
				.align({
					align: 'right',
					x: -marginRight - 20,
					y: plotTop + 30
				})
				.on('click', fn)
				/*.on('touchstart', function(e) {
					e.stopPropagation(); // don't fire the container event
					fn();
				})*/
				.attr({
					align: 'right',
					zIndex: 20
				})
				.add();
				buttons[id] = button;
			}
		}