Add a batch action.

@param string      $title
@param BatchAction $abstract

@return $this
777961
public function add($title, BatchAction $abstract)
    {
        $id = $this->actions->count();

        $abstract->setId($id);

        $this->actions->push(compact('id', 'title', 'abstract'));

        return $this;
    }
89656
public static function apply($title = null)
    {
        $toolbar = Toolbar::getInstance(self::$_toolbar);
        $title   = (empty($title)) ? __d('core', 'Apply') : $title;

        $toolbar->appendButton('Core.action', $title, self::ACTION_APPLY, [
            'class'  => 'jsFormButton',
            'icon'   => 'check-square-o',
            'button' => 'green lighten-2',
        ]);
    }
412163
public function add($title)
    {
        $item = $this->menu->addItem($title);
        $item->parent_id = $this->id;
        $item->parent = $this;

        return $item;
    }
785438
public function addDescription($title, $description, $titleAttribs = [], $descAttribs = [])
    {
        $this->addTitle($title, $titleAttribs)
            ->addDesc($description, $descAttribs);

        return $this;
    }
21648
public function setAction(AbstractAction $action) : DateTime
    {
        $this->action = $action;
        $this->action->setDateTime($this);
        return $this;
    }
875146
public function add(string $title, string $url)
    {
        $this->breadcrumbs->push(new Breadcrumb($title, $url));
    }
1067093
public function addDocument(Document $document, string $opType = null): self
    {
        $action = AbstractDocumentAction::create($document, $opType);

        return $this->addAction($action);
    }
1028069
public function add($title, $url, array $options = array()) {
        $this->append($title, $url, $options);

        return $this;
    }
276374
public function addGroupSelectAction($title, $options)
	{
		$id = ($s = sizeof($this->group_actions)) ? ($s + 1) : 1;

		return $this->group_actions[$id] = new GroupSelectAction($title, $options);
	}
725775
public function spreadsheetByTitle(string $title)
    {
        $list = $this->spreadsheetList();
        $id = Arr::get(array_flip($list), $title);

        $this->spreadsheetId = $id;

        return $this;
    }
421506
public function add($title, $options = '')
    {
        if (!is_array($options)) {
            $url = $options;
            $options = array();
            $options['url'] = $url;
        }

        $options['parent'] = $this->id;

        return $this->builder->add($title, $options);
    }
1169226
public function title($title = null)
    {
        if (is_null($title)) {
            return $this->title;
        }

        $this->title = $title;

        return $this;
    }
1290388
public function addCallButton($title, $phone)
    {
        $this->add(new Button(Button::TYPE_CALL, $title, $phone));

        return $this;
    }
460023
public function setTitle($title)
    {
        if (is_string($title) === true) {
            $this->title = $title;
        } else {
            $msg = "The 'title' argument must be a string, '" . gettype($title) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1124551
public function addScript(AbstractScript $script, string $opType = null): self
    {
        $action = AbstractDocumentAction::create($script, $opType);

        return $this->addAction($action);
    }
1002303
public function addAction($title, $link, array $options = [])
    {
        if (is_array($link)) {
            if (!isset($link['p'])) {
                $link['p'] = P;
            }
            if (!isset($link['do'])) {
                $link['do'] = P_DO;
            }

            // Removed "_default" from main action if called from Main and is the beginning of string
            if (stripos($link['do'], '_default') === 0) {
                $link['do'] = str_replace('_default_', '', $link['do']);
            }

            $link = Linker::makeUrl($link);
        }

        $options['link'] = $link;
        $this->actions[$title] = $options;

        return $this;
    }
426510
public function setTitle($title) {
        $this->title = $title;
        \LaraPageHead::addMetaProperty('og:title', $title);
        \LaraPageHead::addMetaName('twitter:title', $title);

        return $this;
    }