Skip to content

Commit

Permalink
Merge branch '3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Jun 24, 2016
2 parents 6720591 + 7670c8a commit 78846d5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
5 changes: 5 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ title: Widget Change Log

## Version 3.3 {#v3-3}

### v3.3.2 {#v3-3-2}

* Add `Orchestra\Widget\Handlers\Dash`.
* Add `Orchestra\Widget\Handler::isEmpty()` method.

### v3.3.1 {#v3-3-1}

* `Orchestra\Widget\Handler` implements `Illuminate\Contracts\Support\Jsonable`.
Expand Down
2 changes: 1 addition & 1 deletion resources/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'dash' => [
'defaults' => [
'icon' => '',
'color' => 'orange',
'color' => '',
'prefix' => '',
'suffix' => '',
'title' => '',
Expand Down
16 changes: 13 additions & 3 deletions src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,23 @@ public function toJson($options = 0)
}

/**
* Get the number of items for the current page.
* Get the number of items.
*
* @return int
*/
public function count()
{
return $this->nesty->items()->count();
return $this->items()->count();
}

/**
* Determine if the items is empty or not.
*
* @return bool
*/
public function isEmpty()
{
return $this->items()->isEmpty();
}

/**
Expand All @@ -153,6 +163,6 @@ public function count()
*/
public function getIterator()
{
return $this->nesty->items();
return $this->items();
}
}
4 changes: 2 additions & 2 deletions src/Handlers/Dash.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Dash extends Handler
*/
protected $config = [
'defaults' => [
'icon' => 'pie-chart',
'color' => 'orange',
'icon' => '',
'color' => '',
'prefix' => '',
'suffix' => '',
'title' => '',
Expand Down

0 comments on commit 78846d5

Please sign in to comment.