Archived
1
0
Fork 0

app/models/Data/Callback.php: Cant override getSource() anymore as it is marked final, set source in "initialize()" instead.

This commit is contained in:
Henrik Hautakoski 2022-07-26 19:58:26 +02:00
parent d03824518d
commit 1867351716

View file

@ -216,6 +216,9 @@ class Callback extends Model
*/ */
public function initialize() public function initialize()
{ {
// Set table name mapped in the model.
$this->setSource('callback');
$this->useDynamicUpdate(true); $this->useDynamicUpdate(true);
$this->hasMany('id', RequestMeta::class, 'callbackid', array('foreignKey' => true, 'alias' => 'Requests')); $this->hasMany('id', RequestMeta::class, 'callbackid', array('foreignKey' => true, 'alias' => 'Requests'));
@ -227,16 +230,6 @@ class Callback extends Model
))); )));
} }
/**
* Returns table name mapped in the model.
*
* @return string
*/
public function getSource()
{
return 'callback';
}
public function getRequestPaginator($page = 1, $limit = 30) public function getRequestPaginator($page = 1, $limit = 30)
{ {
return RequestMeta::getPaginator($this, $page, $limit); return RequestMeta::getPaginator($this, $page, $limit);