public function SmsMessageResult::setError in SMS Framework 2.1.x
Same name in this branch
- 2.1.x src/Message/SmsMessageResult.php \Drupal\sms\Message\SmsMessageResult::setError()
- 2.1.x src/Entity/SmsMessageResult.php \Drupal\sms\Entity\SmsMessageResult::setError()
Same name and namespace in other branches
- 8 src/Entity/SmsMessageResult.php \Drupal\sms\Entity\SmsMessageResult::setError()
- 2.x src/Entity/SmsMessageResult.php \Drupal\sms\Entity\SmsMessageResult::setError()
Sets the error of the message.
Usually a setting an error on a result indicates something went wrong with the entire transaction.
Parameters
string|null $error: A error code from \Drupal\sms\Message\SmsMessageResultError, or NULL if unknown.
Return value
$this Returns this result object for chaining.
Overrides SmsMessageResultInterface::setError
File
- src/
Entity/ SmsMessageResult.php, line 57
Class
- SmsMessageResult
- Defines the SMS message result entity.
Namespace
Drupal\sms\EntityCode
public function setError($error) {
$this
->set('error', $error);
return $this;
}