class UserCreate in Apigee Edge 8
A job to create a Drupal user from an Apigee Edge developer.
Hierarchy
- class \Drupal\apigee_edge\Job\Job
- class \Drupal\apigee_edge\Job\EdgeJob
- class \Drupal\apigee_edge\Job\UserCreateUpdate uses UserDeveloperSyncJobTrait
- class \Drupal\apigee_edge\Job\UserCreate
- class \Drupal\apigee_edge\Job\UserCreateUpdate uses UserDeveloperSyncJobTrait
- class \Drupal\apigee_edge\Job\EdgeJob
Expanded class hierarchy of UserCreate
File
- src/
Job/ UserCreate.php, line 27
Namespace
Drupal\apigee_edge\JobView source
class UserCreate extends UserCreateUpdate {
/**
* {@inheritdoc}
*/
protected function afterUserSave(DeveloperToUserConversionResult $result) : void {
$context = [];
// If user could be saved.
if ($result
->getUser()
->id()) {
$context['link'] = $result
->getUser()
->toLink(t('View user'))
->toString();
}
// Only log problems after a user has been saved because this way we can
// provide an link to its profile page in log entries.
$this
->logConversionProblems($result
->getProblems(), $context);
parent::afterUserSave($result);
}
/**
* {@inheritdoc}
*/
public function __toString() : string {
return t('Copying developer (@email) from Apigee Edge.', [
'@email' => $this->email,
])
->render();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EdgeJob:: |
protected | property | Request data. | |
EdgeJob:: |
protected | property | Response data. | |
EdgeJob:: |
public | function |
Executes this job. Overrides Job:: |
1 |
EdgeJob:: |
protected | function | Returns the SDK connector instance from the global container. | |
EdgeJob:: |
public | function |
Returns this job's visual representation. Overrides Job:: |
|
Job:: |
protected | property | Exception storage. | |
Job:: |
private | property | Job ID. | |
Job:: |
protected | property | Messages storage. | |
Job:: |
protected | property | Remaining retries. | |
Job:: |
protected | property | Job status. | |
Job:: |
private | property | The tag of the job. | |
Job:: |
protected | constant | Job statuses. | |
Job:: |
public | function | Consumes a retry. | |
Job:: |
public | constant | Job is failed, and it won't be retried. | |
Job:: |
public | constant | Job is finished successfully. | |
Job:: |
public | function | Gets all stored exception data. | |
Job:: |
public | function | Gets the job id. | |
Job:: |
public | function | Gets all stored messages. | |
Job:: |
public | function | Gets the status of the job. | |
Job:: |
public | function | Gets the job tag. | |
Job:: |
public | constant | Job is waiting to be picked up by a worker. | |
Job:: |
public | function | Adds an exception to the exception storage. | |
Job:: |
public | function | Adds a message to the message storage. | |
Job:: |
public | constant | Job failed, waiting to be retried. | |
Job:: |
public | constant | Job is running. | |
Job:: |
public | constant | Job is claimed by a worker, but not running yet. | |
Job:: |
public | function | Sets the status of the job. | |
Job:: |
public | function | Sets the job tag. | |
Job:: |
public | function | Whether this job should be retried when an exception is thrown. | |
UserCreate:: |
protected | function |
Execute actions after the user has been saved. Overrides UserCreateUpdate:: |
|
UserCreate:: |
public | function |
Returns this job's textual representation. Overrides Job:: |
|
UserCreateUpdate:: |
protected | property | The Apigee Edge developer's email. | |
UserCreateUpdate:: |
protected | function | Execute actions before the user gets saved. | 1 |
UserCreateUpdate:: |
protected | function |
Executes the request itself. Overrides EdgeJob:: |
|
UserCreateUpdate:: |
protected | function |
Logs an entity conversation problems encountered meanwhile syncing. Overrides UserDeveloperSyncJobTrait:: |
|
UserCreateUpdate:: |
public | function |
UserCreateUpdate constructor. Overrides Job:: |
|
UserDeveloperSyncJobTrait:: |
protected | function | Field-attribute converter service. | |
UserDeveloperSyncJobTrait:: |
protected | function | Logs all entity conversion problems encountered meanwhile syncing. | |
UserDeveloperSyncJobTrait:: |
protected | function | Logger interface. | |
UserDeveloperSyncJobTrait:: |
protected | function | User-developer converter service. |