PHPackages                             kriptograf/yii2-wishlist - 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. kriptograf/yii2-wishlist

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

kriptograf/yii2-wishlist
========================

Кнопка добавить в избранное

0491PHP

Since Sep 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kriptograf/yii2-wishlist)[ Packagist](https://packagist.org/packages/kriptograf/yii2-wishlist)[ RSS](/packages/kriptograf-yii2-wishlist/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Yii2-wishlist
=============

[](#yii2-wishlist)

Модуль избранного для Yii2 фреймворка. ДЛЯ любых ПОЛЬЗОВАТЕЛЕЙ

Установка
---------

[](#установка)

Выполнить команду

```
composer require kriptograf/yii2-wishlist "*"

```

Либо в composer.json строку:

```
"kriptograf/yii2-wishlist": "dev-master",

```

Далее, мигрируем базу:

```
php yii migrate --migrationPath=vendor/kriptograf/yii2-wishlist/migrations

```

Подключение и настройка
-----------------------

[](#подключение-и-настройка)

В конфигурационный файл приложения добавить модуль и компонент wishlist

```
    'modules' => [
        'wishlist' => [
            'class' => 'kriptograf\wishlist\Module',
            'dbDateExpired' => 'CURDATE() + INTERVAL 7 DAY', //дата истечения срока действия избранного в БД
            'cokieDateExpired' => time() + 86400 * 365, //Время жизни куки с токеном
        ],
        //...
    ],

    'components' => [
        'wishlist' => [
            'class' => 'kriptograf\wishlist\Wishlist'
        ],
        //...
    ],
```

Компоненты
==========

[](#компоненты)

Получить вишлист ТЕКУЩЕГО пользователя (возвращает массив моделей добавленных в вишлист объектов):

```
\Yii::$app->wishlist->getUserWishList()
```

Получить количество добавленных в вишлист объектов для текущего пользователя

```
\Yii::$app->wishlist->getUserWishlistAmount()
```

Виджеты
=======

[](#виджеты)

Кнопка добавить/убрать объект в избранное.

```

```

Дефолтные css-стили

```
.hal-wishlist-button {
    font-weight: 700;
}

.hal-wishlist-button:before {
    content: "\f08a";
    font: 400 15px/31px "FontAwesome";
    color: white;
    background: #929292; /* цвет сердечка */
    width: 30px;
    text-align: center;
    display: inline-block;
    height: 30px;
    margin: 0 6px 0 0;
    -moz-border-radius: 50px;
    -webkit-border-radius: 50px;
    border-radius: 50px;
}

.hal-wishlist-button:hover {
    cursor: pointer;
}

.in-list:before {
    background: #CC63B0; /* цвет сердечка */
}
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.7% 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://www.gravatar.com/avatar/3b18ade8fdb15c3afc65fc88906bf251949f58baca92084a539729ef09211027?d=identicon)[kriptograf](/maintainers/kriptograf)

---

Top Contributors

[![kriptograf](https://avatars.githubusercontent.com/u/2950209?v=4)](https://github.com/kriptograf "kriptograf (27 commits)")[![halumein](https://avatars.githubusercontent.com/u/5361342?v=4)](https://github.com/halumein "halumein (16 commits)")[![AlChilyakov](https://avatars.githubusercontent.com/u/18215959?v=4)](https://github.com/AlChilyakov "AlChilyakov (3 commits)")

### Embed Badge

![Health badge](/badges/kriptograf-yii2-wishlist/health.svg)

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

###  Alternatives

[flarum/mentions

Mention and reply to specific posts and users.

18435.7k12](/packages/flarum-mentions)[youwe/workflow-gui

Workflow Configuration UI for Pimcore

2886.9k](/packages/youwe-workflow-gui)

PHPackages © 2026

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