Skip to content

Commit 3f69d9d

Browse files
committed
Add CHANGELOG and update README
1 parent 38c6c67 commit 3f69d9d

2 files changed

Lines changed: 43 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Version 1.0.0
2+
3+
1. Make PlatesPhpTemplateEngine to process content

README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1-
# PlatesPHP for KoolReport
1+
# PlatesPhp for KoolReport
22

3-
This is package to add to KoolReport the capability of using PlatesPHP template engine to generate view content.
3+
This package make KoolReport able to use PlatesPhp template engine to generate view content.
4+
5+
# Installation
6+
7+
Run composer command
8+
9+
```
10+
composer require koolreport\platesphp
11+
```
12+
13+
# Guide
14+
15+
1. Add `use \koolreport\platesphp\Engine;` to your report
16+
2. Add protected method `platesInit()` and return the plates object
17+
18+
# Example
19+
20+
```
21+
class MyReport extends \koolreport\KoolReport
22+
{
23+
use \koolreport\platesphp\Engine;
24+
protected function platesInit()
25+
{
26+
return League\Plates\Engine::create(dirname(__FILE__).'/templates');
27+
}
28+
29+
}
30+
```
31+
32+
Supposed you have a view for report named `myreport.phtml` inside `templates` folder, you can render your report like this:
33+
34+
```
35+
$report = new MyReport;
36+
$report->run()->render("myreport");
37+
```
38+
39+
# Support
40+
41+
Please use [our forum](https://www.koolreport.com/forum/topics) if you need support, by this way other people can benefit as well. If the support request need privacy, you may send email to us at [support@koolreport.com](mailto:support@koolreport.com).

0 commit comments

Comments
 (0)