samwolf1982 / yii2-wishlist
Кнопка добавить в избранное plus extend model
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 5
Type:yii2-extension
Requires
- php: >=5.4.0
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
This package is auto-updated.
Last update: 2025-06-25 17:52:20 UTC
README
'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($type=0)
\Yii::$app->wishlist->getUserWishlistAmount()
add if present class
<?php use kriptograf\wishlist\widgets\WishlistButton; ?> <?php ?> <?= WishlistButton::widget([ 'model' => $model ]) ?>
.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: #CC63B0l; }