EntityNotFoundException.php in Salesforce Suite 8.3
File
src/EntityNotFoundException.php
View source
<?php
namespace Drupal\salesforce;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Component\Render\FormattableMarkup;
use Throwable;
class EntityNotFoundException extends \RuntimeException {
use StringTranslationTrait;
protected $entityProperties;
protected $entityTypeId;
public function __construct($entityProperties, $entityTypeId, Throwable $previous = NULL) {
parent::__construct($this
->t('Entity not found. type: %type properties: %props', [
'%type' => $entityTypeId,
'%props' => var_export($entityProperties, TRUE),
]), 0, $previous);
$this->entityProperties = $entityProperties;
$this->entityTypeId = $entityTypeId;
}
public function getEntityProperties() {
return $this->entityProperties;
}
public function getEntityTypeId() {
return $this->entityTypeId;
}
public function getFormattableMessage() {
return new FormattableMarkup('Entity not found. type: %type properties: %props', [
'%type' => $this->entityTypeId,
'%props' => var_export($this->entityProperties, TRUE),
]);
}
}