for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace hauntd\vote\widgets;
use Yii;
use yii\bootstrap\Html;
/**
* @author Alexander Kononenko <[email protected]>
* @package hauntd\vote\widgets
*/
class Like extends VoteToggle
{
* @var string
public $jsCodeKey = 'vote-like';
* @return array
public function getDefaultOptions()
return array_merge(parent::getDefaultOptions(), [
'class' => 'vote-toggle vote-toggle-like',
]);
}
public function getDefaultButtonOptions()
return array_merge(parent::getDefaultButtonOptions(), [
'icon' => Html::icon('glyphicon glyphicon-heart'),
'label' => Yii::t('vote', 'Like'),