for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace app\api\models;
use app\models as base;
use roaresearch\yii2\roa\hal\{Contract, ContractTrait};
/**
* ROA contract to handle credit records.
*/
class Credit extends base\Credit implements Contract
{
use ContractTrait {
getLinks as getContractLinks;
}
* @inheritdoc
protected function assignmentClass(): string
return CreditAssignment::class;
protected function workLogClass(): string
return CreditWorkLog::class;
protected function slugBehaviorConfig(): array
return [
'resourceName' => 'credit',
];
public function getLinks()
return array_merge($this->getContractLinks(), [
'worklog' => $this->getSelfLink() . '/worklog',
]);
public function extraFields()
'workLogs',
'activeWorkLog',