Property | Type | Description | |
---|---|---|---|
$model | |||
$operations | Default set of operations for a model service, override if required. | ||
$primary_model | string | The primary model class for this service. |
Method | Description | |
---|---|---|
__construct ( BaseActiveRecord $model ) | ||
create ( |
||
getLastModified ( integer $id ) : integer | ||
load ( array $params = [] ) | ||
read ( integer $id ) : resource | ||
update ( integer $id, |
Method | Description | |
---|---|---|
getResourcesFromDataProvider ( CActiveDataProvider $provider ) : resource[] | Get a list of resources from an AR data provider. | |
getSearchModel ( ) : BaseActiveRecord | Get an instance of the model class to fill in with search details. | |
modelToResource ( BaseActiveRecord $model ) : resource | ||
readModel ( integer $id ) : BaseActiveRecord | ||
resourceToModel ( resource $resource, BaseActiveRecord $model ) | ||
saveModel ( BaseActiveRecord $model ) | * Save model object and throw a service layer exception on failure |
public getLastModified ( integer $id ) : integer | ||
$id | integer | |
return | integer |
protected getResourcesFromDataProvider ( CActiveDataProvider $provider ) : resource[] | ||
$provider | CActiveDataProvider | |
return | resource[] |
protected getSearchModel ( ) : BaseActiveRecord | ||
return | BaseActiveRecord |
protected modelToResource ( BaseActiveRecord $model ) : resource | ||
$model | BaseActiveRecord | |
return | resource |
protected resourceToModel ( resource $resource, BaseActiveRecord $model ) | ||
$resource | resource | |
$model | BaseActiveRecord |
protected saveModel ( BaseActiveRecord $model ) | ||
$model | BaseActiveRecord |
protected static $operations |
protected static string $primary_model | ||
return | string |