Add share button

@return $this
779276
public function addShareButton($shareContent = null)
    {
        $button = new Button(Button::TYPE_SHARE, '');
        if ($shareContent) {
            $button->setExtra($shareContent);
        }
        $this->add($button);

        return $this;
    }
828922
public function addGroup() {
		$nb=sizeof($this->elements);
		$bg=new HtmlButtongroups($this->identifier."-buttongroups-".$nb);
		$this->elements []=$bg;
		return $bg;
	}
182547
public function addButtons(array $buttons): self
    {
        foreach ($buttons as $button) {
            if ($button instanceof ElementButton) {
                $this->buttons[] = $button->toArray();
            }
        }

        return $this;
    }
1039820
public function addButton(Button $button)
    {
        $this->list[] = $button;
        $this->listCount++;
        $this->ulList = false;
        return $this;
    }
393960
public function addButtons(array $buttons): self
    {
        $this->isValidArray($buttons, 5);
        $this->isValidButtons($buttons, $this->getAllowedButtonsType());

        $this->buttons = $buttons;

        return $this;
    }
65211
protected function render_sharethis_button(): string
    {
        \wp_enqueue_script(
            'sharethis',
            'https://ws.sharethis.com/button/buttons.js'
        );

        return '<span class="st_sharethis_hcount" st_url="'.
            \wp_get_shortlink($this->post->get()->ID).'" st_title="'.
            \esc_attr(\sanitize_text_field(\get_the_title($this->post->get()))).
            '" st_summary="'.\esc_attr($this->post->excerpt()).
            '" st_via=""></span>';
    }
1084042
public function addAction()
    {
        $parent = $this->params()->fromRoute('parent');
        if (! is_numeric($parent)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The file location was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        $form = $this->getFileAddForm();
        $form->setAttribute(
            'action',
            $this->url()->fromRoute(
                'sc-admin/file/add',
                ['parent' => $parent]
            )
        );
        $request = $this->getRequest();

        if ($request->isPost()) {
            $post = array_merge_recursive(
                $request->getPost()->toArray(),
                $request->getFiles()->toArray()
            );
            $form->setData($post);
            if ($form->isValid()) {
                try {
                    $transfer = $this->getFileTransfer();
                    $data = $transfer->receive($form->getData());
                    $fileIds = $this->getFileService()->makeFiles(
                        $parent, $data
                    );
                    return $this->redirect()->toRoute(
                        'sc-admin/file/edit',
                        ['id' => implode(',', $fileIds)]
                    );
                } catch (Exception $e) {
                    if (isset($data)) {
                        $transfer->rollBack($data);
                    }
                    if ($e instanceof RuntimeException) {
                        $this->flashMessenger()->addMessage($e->getMessage());
                        return $this->redirect()
                            ->toRoute('sc-admin/content-manager')
                            ->setStatusCode(303);
                    } elseif (DEBUG_MODE) {
                        throw new DebugException(
                            $e->getMessage(),
                            $e->getCode(),
                            $e
                        );
                    }
                }
            }
        }
        return new ViewModel([
            'form' => $form,
        ]);
    }
884527
public function addButton(PagingButton $button)
    {
        if (!in_array($button, $this->buttons, true)) {
            array_push($this->buttons, $button);
        }
        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']);
    }
372347
public function addExcelAction()
    {
        $options = array(
            'class'  => 'excel',
            //'rel'    => 'external',
            'target' => null,
            'title'  => $this->_('Export the current data set to Excel'),
            //'type'   => 'application/vnd.ms-excel',
        );

        return $this->addActionButton($this->_('Excel export'), $this->get('privilege') . '.excel', 'excel', $options);
    }
1029504
public function add()
    {
        $group = $this->Groups->newEntity();
        if ($this->request->is('post')) {
            $group  = $this->Groups->patchEntity($group, $this->request->getData());
            $result = $this->Groups->save($group);
            if ($result) {
                $this->Flash->success(__d('community', 'The group has been saved.'));
                return $this->App->redirect([
                    'apply' => ['action' => 'edit', $result->id],
                ]);
            } else {
                $this->Flash->error(__d('community', 'The group could not be saved. Please, try again.'));
            }
        }

        $parents = $this->Groups->getTreeList();
        $this->set(compact('group', 'parents'));
        $this->set('page_title', __d('community', 'Add new group'));
    }
322297
public function addButtonButton(string $name) : Element\Button\Button
    {
        $button = new Element\Button\Button($this, $name);
        $this->addComponent($name, $button);

        return $button;
    }
354616
public function createButtonGroup()
    {
        $node = new Group();
        $this->childNodes->push($node);

        return $this->childNodes->last();
    }
1112103
public function setShared($shared)
    {
        $this->changes['shared'] = true;

        $this->shared = (bool) $shared;

        return $this;
    }
1190242
public function addHomePageAcf()
    {
        $homePageId = (int)$this->wpProvider->getOption('page_on_front');
        $this->addAcfFromPage($homePageId);
        return $this;
    }
1165772
public function append()
    {
        $this->importNodes(\func_get_args(), function ($node, $imported_node) {
            $node->appendChild($imported_node);
        });

        return $this;
    }
295605
def twitter_share_button(options={})
      options = Hash[options.map {|k, v| ["data-#{k}", v] }]
      options.merge!({:href => 'https://twitter.com/share', :class => 'twitter-share-button'})

      content_tag :a, 'Tweet', options
    end