Add new header item.

@return \Nwidart\Menus\MenuItem
480275
public function addHeader($title, $order = null)
    {
        $this->items[] = new MenuItem(array(
            'name' => 'header',
            'title' => $title,
            'order' => $order,
        ));

        return $this;
    }
207356
public function add_menu() {
		if ( !isset( $this->page_id ) && !isset( $this->title ) && !isset( $this->name ) && !isset( $this->parent ) && !isset( $this->cap ) ) {
			return;
		}

		if ( $this->parent ) {	
			$this->screen_name = add_submenu_page( $this->parent, $this->title, $this->name, $this->cap, $this->page_id, array( &$this, 'render_page' ) );
		} else {
			$this->screen_name = add_menu_page( $this->title, $this->name, $this->cap, $this->page_id, array( &$this, 'render_page' ) );	
		}
	}
959478
protected function prefillHeader()
    {
        if ($this->requiresAuthorization() && !empty($this->getAuthorizationHeader())) {
            $this->headers['Authorization'] = $this->getAuthorizationHeader();
        }
        return $this;
    }
150434
public function add(array $attributes = array())
    {
        $item = MenuItem::make($attributes);

        $this->items[] = $item;

        return $item;
    }
65144
public function build()
    {
        $event = new AdminMenuEvent();

        $this->eventDispatcher->dispatch(Admin::MENU, $event);

        return $event->getItems();
    }
1223936
public function addHeader($headers)
    {
        foreach ((array) $headers as $header) {
            if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) {
                throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons');
            }
            $this->headers[] = $header;
        }

        return $this;
    }
676729
public function addMenu()
    {
        $menuLocations = $this->wpProvider
            ->getNavMenuLocations();

        $data = [];

        foreach ($menuLocations as $menuLocation => $menuId) {
            $menu = $this->wpProvider
                ->wpGetNavMenuItems($menuId);

            foreach ($menu as $menuItem) {
                $item = new stdClass();

                /**
                 * @var WpPost $menuItem
                 */
                $item->item = $menuItem->title;
                $item->link = $menuItem->url;
                $item->active = (Path::getCurrentUrl() === $menuItem->url) ? true : false;

                $data[$menuLocation][] = $item;
            }
        }

        $this->mergeToTheData($data);
        return $this;
    }
99070
public function add()
    {
        $cmsTerm = $this->CmsTerm->newEntity();
        if ($this->request->is('post')) {
            $cmsTerm = $this->CmsTerm->patchEntity($cmsTerm, $this->request->data);
            if ($this->CmsTerm->save($cmsTerm)) {
                $this->Flash->success('The cms term has been saved.');
                return $this->redirect(['action' => 'index']);
            } else {
                $this->Flash->error('The cms term could not be saved. Please, try again.');
            }
        }
        $this->set(compact('cmsTerm'));
        $this->set('_serialize', ['cmsTerm']);
    }
475256
protected function createHeader($name)
    {
        $new = clone $this;

        $normalized = strtolower($name);

        $name = HeaderHelper::normalizeHeaderName($name);

        $new->headerNames[$normalized] = $name;
        $new->headers[$name] = [];

        return $new;
    }
1119185
protected function sendHeaders()
    {
        $headers = $this->getHeaders();

        foreach ($headers as $header) {
            header($header);
        }
        return $this;
    }
364432
public function add()
    {
        $this->loadModel('Menu.Menus');
        $menu = $this->Menus->newEntity();

        if ($this->request->data()) {
            $data = $this->request->data();
            $data['handler'] = 'Menu';
            $menu = $this->Menus->patchEntity($menu, $data, [
                'fieldList' => [
                    'title',
                    'handler',
                    'description',
                    'settings',
                ],
            ]);

            if ($this->Menus->save($menu, ['atomic' => true])) {
                $this->Flash->success(__d('menu', 'Menu has been created, now you can start adding links!'));
                $this->redirect(['plugin' => 'Menu', 'controller' => 'links', 'action' => 'add', $menu->id]);
            } else {
                $this->Flash->danger(__d('menu', 'Menu could not be created, please check your information'));
            }
        }

        $this->title(__d('menu', 'Create New Menu'));
        $this->set('menu', $menu);
        $this->Breadcrumb
            ->push('/admin/menu/manage')
            ->push(__d('menu', 'Creating new menu'), '#');
    }
1251123
public function actionCreateFromPage()
    {
        $this->menuFlush();
        $model = new Nav();
        $response = $model->createItemLanguageCopy($this->postArg('id'), $this->postArg('toLangId'), $this->postArg('title'), $this->postArg('alias'));
        
        if (is_array($response)) {
            return $this->sendArrayError($response);
        }
        
        return $response;
    }
183298
public function add_new_child_item($title='') {
        $sc         = new cc_item();
        $sc->title  = $title;
        $this->add_child_item($sc);
        return $sc;
    }
1180967
protected function addHeaders()
    {
        if (empty($this->headers)) {
            return $this;
        }

        $this->options[CURLOPT_HTTPHEADER] = $this->headers;
        return $this;
    }
545966
public function setHeader(array $header)
    {
        $this->header = [];
        foreach ($header as $key => $value) {
            $this->addHeader($key, $value);
        }

        return $this;
    }
1314324
public function add(string $name, string $value): HeaderCollection
    {
        $name = trim(strtolower($name));
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = new Header($name);
        }
        $this->headers[$name]->addValue($value);
        return $this;
    }
309626
public function withAddedHeader($header, $value)
    {
        $new = $this->psrRequest->withAddedHeader($header, $value);
        return new self($new, $this->originalRequest);
    }