Refactor project structure

This commit is contained in:
Thilina Hasantha
2018-04-29 17:46:42 +02:00
parent 889baf124c
commit e3a7e18d9c
5513 changed files with 32 additions and 27 deletions

51
core/src/Model/Report.php Normal file
View File

@@ -0,0 +1,51 @@
<?php
/**
* Created by PhpStorm.
* User: Thilina
* Date: 8/21/17
* Time: 2:34 AM
*/
namespace Model;
class Report extends BaseModel
{
public function getAdminAccess()
{
return array("get","element","save","delete");
}
public function getManagerAccess()
{
return array("get","element","save","delete");
}
public function getUserAccess()
{
return array();
}
public function postProcessGetData($entry)
{
$entry->icon = '<img src="'.BASE_URL.'images/file-icons/'.strtolower($entry->output).".png".'"/>';
return $entry;
}
public function getCustomFilterQuery($filter)
{
$filter = json_decode($filter, true);
if ($filter['type'] === 'Reports') {
$query = ' and report_group <> ?';
} elseif ($filter['type'] === 'Exports') {
$query = ' and report_group = ?';
} else {
$query = '';
}
$queryData = array('Payroll');
return array($query, $queryData);
}
public $table = 'Reports';
}