Set drop-down items.

@param array $links

@return $this
343816
public function dropDown(array $links)
    {
        if (is_array($links[0])) {
            foreach ($links as $link) {
                call_user_func([$this, 'dropDown'], $link);
            }

            return $this;
        }

        $this->data['dropDown'][] = [
            'name' => $links[0],
            'href' => $links[1],
        ];

        return $this;
    }
947673
public function addSymlinks(array $symlinks)
    {
        foreach ($symlinks as $linkPath => $sourcePath) {
            $this->addSymlink($linkPath, $sourcePath);
        }

        return $this;
    }
708534
@SuppressWarnings("unchecked")
	public T add(Link... links) {

		Assert.notNull(links, "Given links must not be null!");

		add(Arrays.asList(links));

		return (T) this;
	}
1123940
public function setOrder(array $keys) {
        $this->itemsOrdered = [];

        foreach($keys as $label => $value) {
            if($value === 'spacer' || $value === '|') {
                $this->itemsOrdered[] = $this->spacer;
            } elseif(is_array($value)) {
                $parts = explode(',', $label);
                if($this->hasItem($parts[0])) {
                    $dropdown = new DropdownToolbarItem($parts[1]);
                    $dropdown->button = $this->getItem($parts[0]);
                } else {
                    $dropdown = new DropdownToolbarItem($parts[0]);
                }

                foreach($value as $dropdownItem) {
                    $dropdown->addItem($this->getItem($dropdownItem));
                }
                $this->itemsOrdered[] = $dropdown;
            } else {
                $this->itemsOrdered[] = $this->getItem($value);
            }
        }
    }
975678
public function set(array $tags)
    {
        if (!empty($tags)) {
            foreach ($tags as $_tag) {
                $this->add($_tag);
            }
        }
        return $this;
    }
560689
public function setItem($link, $title)
    {
        $this->setLink($link);
        $this->setTitle($title);
        
        return $this;
    }
1244726
public function setValues(array $values)
    {
        foreach ($values as $name => $value) {
            if ($element = $this->get($name)) {
                $element->setValue($value);
            }
        }
        return $this;
    }
1031749
public function addChoices(array $choices)
    {
        foreach ($choices as $choiceIdent => $choice) {
            $this->addChoice($choiceIdent, $choice);
        }

        return $this;
    }
930834
public function setTitle($title, $link = null)
    {
        $this->data['title'] = $title;
        if ($link) {
            $this->data['title_link'] = $link;
        }

        return $this;
    }
710945
public function setCategories($categories)
    {
        foreach ($categories as $category) {
            $category->setBlog($this);
        }
        $this->categories = $categories;

        return $this;
    }
456493
protected function buildLinks($links, array $linksOptions = [])
    {
        return array_map(function ($link) use ($linksOptions) {
            return $this->Html->link($link[0], $link[1], $linksOptions);
        }, $links);
    }
603016
public function setPaths($paths)
    {
        $paths = (array)$paths;
        //Append framework's view path
        $paths[] = realpath(__DIR__ . '/../../views');

        $this->paths = $paths;
        return $this;
    }
269885
private function plugin_action_links( $links ) {
		$link = $this->get_view( 'admin/include/action_links', [
			'url' => menu_page_url( $this->get_menu_slug(), false ),
		] );
		array_unshift( $links, $link );

		return $links;
	}
23624
public function setButtons(array $buttons)
    {
        $this->buttons = array();
        foreach ($buttons as $button) {
            $this->addButton($button);
        }
        return $this;
    }
1082825
public function setAllValues(array $values)
    {
        foreach ($values as $key => $value) {
            $this->$key = $value;
        }

        return $this;
    }
684600
public function setWebButtons(array $buttons)
    {
        collect($buttons)->map(function ($button) {
            $this->setWebButton($button);
        });

        return $this;
    }
846869
public function setLink(Link $link): self
    {
        $this->link = $link;
        $this->agent = $link->getAgent();

        return $this;
    }