PHPackages                             webulla/yii2-sharelinks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webulla/yii2-sharelinks

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

webulla/yii2-sharelinks
=======================

Yii2 widget for social networks or email sharing

11671[1 issues](https://github.com/gustarus/yii2-sharelinks/issues)PHP

Since Apr 19Pushed 11y ago2 watchersCompare

[ Source](https://github.com/gustarus/yii2-sharelinks)[ Packagist](https://packagist.org/packages/webulla/yii2-sharelinks)[ RSS](/packages/webulla-yii2-sharelinks/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Webulla Yii2 sharing links widget
=================================

[](#webulla-yii2-sharing-links-widget)

Widget for posting links to publications on social networks.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require "webulla/yii2-sharelinks":"*"

```

Usage
-----

[](#usage)

First, you need to connect the widget:

```
use webulla\sharelinks\ShareLinks;
```

Then, you can use widget with default configurations for sharing via facebook, twitter, vkontakte and email:

```
echo ShareLinks::widget([
	'links' => [
		'facebook' => [],
		'twitter' => [],
		'vkontakte' => [],
		'email' => [],
	]
]);
```

Or, you can override any default settings:

```
echo ShareLinks::widget([
	// page url (default: Yii::$app->request->absoluteUrl)
	'url' => 'http://yoursite.com/page',

	// page title (default: Yii::$app->view->title)
	'title' => 'Page title',

	// page description
	'body' => 'Page description',

	// links collection
	'links' => [
        // default service
		'facebook' => ['label' => 'Facebook'],

		// custom service in popup window
		'service' => ['label' => 'Share via Service',
		    'url' => 'http://service.com/share?title={title}&body={body}&url={url}'
        ],

		// custom service in new tab
		'service-manual' => ['label' => 'Share via Service',
		    'url' => 'http://service.com/share?title={title}&body={body}&url={url}',
            'options' => [
                'class' => 'share-link-manual',  // disable on click event listening
                'target' => '_blank', // open link in new tab
            ]
        ],
	]
]);
```

Predefined services:

```
$services = [
	'twitter' => ['label' => 'Share via twitter'],
	'facebook' => ['label' => 'Share via Facebook'],
	'vkontakte' => ['label' => 'Share via Vkontakte'],
	'gplus' => ['label' => 'Share via Google Plus'],
	'linkedin' => ['label' => 'Share via Linkedin'],
	'kindle' => ['label' => 'Share via Kindle'],
	'email' => ['label' => 'Share via E-mail'],
];
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7753223?v=4)[Pavel Kondratenko](/maintainers/gustarus)[@gustarus](https://github.com/gustarus)

---

Top Contributors

[![gustarus](https://avatars.githubusercontent.com/u/7753223?v=4)](https://github.com/gustarus "gustarus (4 commits)")

### Embed Badge

![Health badge](/badges/webulla-yii2-sharelinks/health.svg)

```
[![Health](https://phpackages.com/badges/webulla-yii2-sharelinks/health.svg)](https://phpackages.com/packages/webulla-yii2-sharelinks)
```

###  Alternatives

[adigital/cookie-consent-banner

Add a configurable cookie consent banner to the website.

1150.7k](/packages/adigital-cookie-consent-banner)[michaels/data-manager

Simple data manager for nested data, dot notation array access, extendability, and container interoperability.

121.9k2](/packages/michaels-data-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
