Refactoring
This commit is contained in:
42
src/Metadata/Common/Model/CalculationHook.php
Normal file
42
src/Metadata/Common/Model/CalculationHook.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Thilina
|
||||
* Date: 8/19/17
|
||||
* Time: 3:08 PM
|
||||
*/
|
||||
|
||||
namespace Metadata\Common\Model;
|
||||
|
||||
use Classes\BaseService;
|
||||
use Model\BaseModel;
|
||||
|
||||
class CalculationHook extends BaseModel
|
||||
{
|
||||
var $_table = 'CalculationHooks';
|
||||
|
||||
public function getAdminAccess()
|
||||
{
|
||||
return array("get","element","save","delete");
|
||||
}
|
||||
|
||||
public function getUserAccess()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function getAnonymousAccess()
|
||||
{
|
||||
return array("get","element");
|
||||
}
|
||||
|
||||
function Find($whereOrderBy, $bindarr = false, $pkeysArr = false, $extra = array())
|
||||
{
|
||||
return BaseService::getInstance()->getCalculationHooks();
|
||||
}
|
||||
|
||||
function Load($where = null, $bindarr = false)
|
||||
{
|
||||
return BaseService::getInstance()->getCalculationHook($bindarr[0]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user