Skip to content

Commit

Permalink
Create report element
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Oct 25, 2024
1 parent 6b9e631 commit b5d7637
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/Element/Dashboard/ReportDefinition.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php namespace October\Rain\Element\Dashboard;

use October\Rain\Element\ElementBase;

/**
* ReportDefinition
*
* @method ReportDefinition reportName(string $name) reportName for this report
* @method ReportDefinition type(string $type) type for display mode, eg: indicator, static
* @method ReportDefinition dateStart(string $dateStart) dateStart
* @method ReportDefinition dateEnd(string $dateEnd) dateEnd
* @method ReportDefinition compareWith(string $compareWith) compareWith period, eg: prev-period, prev-year
* @method ReportDefinition resetCache(bool $resetCache) resetCache when rendering
* @method ReportDefinition aggregationInterval(string $aggregationInterval) aggregationInterval for display, eg: day, week, month
*
* @package october\element
* @author Alexey Bobkov, Samuel Georges
*/
class ReportDefinition extends ElementBase
{
/**
* initDefaultValues for this report
*/
protected function initDefaultValues()
{
$this
->displayAs('static')
;
}

/**
* displayAs type for this field
*/
public function displayAs(string $type): ReportDefinition
{
$this->type($type);

return $this;
}
}

0 comments on commit b5d7637

Please sign in to comment.