Since v0.6
Pay attention! You should use echo
and widget()
method when you work with the widget. It uses ShadowSupport, ColorSupport and CustomCssSupport traits.
string $name
- usernamestring $image = ''
- user imagestring $position = ''
- user role or position (title of a card)bool $gradient = false
- makes a gradient card, uses $color property (Bootstrap 4 colors or additional colors of AdminLTE)array $rows = []
- list of rows (see an example below).
<?= SocialWidget::widget([
'name' => 'Jonathan Burke Jr.',
'position' => 'Senior backend developer',
'image' => '../avatars/user2-160x160.jpg',
'color' => 'lightblue',
'shadow' => 'shadow',
'rows' => [
'Projects' => [
'31',
'#url',
'primary'
],
'Tasks' => [
'5',
'#',
'navy'
],
'Completed Projects' => [
'12',
'#',
'success'
],
'Followers' => [
'842',
'https://example.com',
'purple'
],
],
]); ?>