Свойство | 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. |
Méthode | Description | |
---|---|---|
__construct ( BaseActiveRecord $model ) | ||
create ( |
||
getLastModified ( integer $id ) : integer | ||
load ( array $params = [] ) | ||
read ( integer $id ) : resource | ||
update ( integer $id, |
Méthode | 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 | |
Résultat | integer |
protected getResourcesFromDataProvider ( CActiveDataProvider $provider ) : resource[] | ||
$provider | CActiveDataProvider | |
Résultat | resource[] |
protected getSearchModel ( ) : BaseActiveRecord | ||
Résultat | BaseActiveRecord |
protected modelToResource ( BaseActiveRecord $model ) : resource | ||
$model | BaseActiveRecord | |
Résultat | 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 | ||
Résultat | string |