@@ -763,7 +762,7 @@ protected function processConfiguration($collection, $op, $name) {
}
}
catch(\Exception$e){
$this->logError($this->t('Unexpected error during import with operation @op for @name: @message',array('@op'=>$op,'@name'=>$name,'@message'=>$e->getMessage())));
$this->logError($this->t('Unexpected error during import with operation @op for @name: !message',array('@op'=>$op,'@name'=>$name,'!message'=>$e->getMessage())));
// Error for that operation was logged, mark it as processed so that
thrownewEntityStorageException(SafeMarkup::format('The entity storage "@storage" for the "@entity_type" entity type does not support imports',array('@storage'=>get_class($entity_storage),'@entity_type'=>$entity_type)));
thrownewEntityStorageException(sprintf('The entity storage "%s" for the "%s" entity type does not support imports',get_class($entity_storage),$entity_type));
thrownewEntityStorageException(SafeMarkup::format('The entity storage "@storage" for the "@entity_type" entity type does not support imports',array('@storage'=>get_class($entity_storage),'@entity_type'=>$entity_type_id)));
thrownewEntityStorageException(sprintf("The entity storage '%s' for the '%s' entity type does not support imports",get_class($entity_storage),$entity_type_id));
thrownewConfigDuplicateUUIDException(SafeMarkup::format('Attempt to save a configuration entity %id with UUID %uuid when this UUID is already used for %matched',array('%id'=>$this->id(),'%uuid'=>$this->uuid(),'%matched'=>$matched_entity)));
thrownewConfigDuplicateUUIDException("Attempt to save a configuration entity '{$this->id()}' with UUID '{$this->uuid()}' when this UUID is already used for '$matched_entity'");
}
// If this entity is not new, load the original entity for comparison.
...
...
@@ -339,7 +338,7 @@ public function preSave(EntityStorageInterface $storage) {
thrownewConfigDuplicateUUIDException(SafeMarkup::format('Attempt to save a configuration entity %id with UUID %uuid when this entity already exists with UUID %original_uuid',array('%id'=>$this->id(),'%uuid'=>$this->uuid(),'%original_uuid'=>$original->uuid())));
thrownewConfigDuplicateUUIDException("Attempt to save a configuration entity '{$this->id()}' with UUID '{$this->uuid()}' when this entity already exists with UUID '{$original->uuid()}'");
thrownewConfigEntityIdLengthException(SafeMarkup::format('Configuration entity ID @id exceeds maximum allowed length of @length characters.',array(
'@id'=>$entity->get($this->idKey),
'@length'=>self::MAX_ID_LENGTH,
)));
thrownewConfigEntityIdLengthException("Configuration entity ID {$entity->get($this->idKey)} exceeds maximum allowed length of ".self::MAX_ID_LENGTH." characters.");
}
returnparent::save($entity);
...
...
@@ -404,7 +400,7 @@ public function importUpdate($name, Config $new_config, Config $old_config) {
* Provides an implementation of a configuration entity type and its metadata.
...
...
@@ -93,10 +92,7 @@ public function getConfigPrefix() {
}
if(strlen($config_prefix)>static::PREFIX_LENGTH){
thrownewConfigPrefixLengthException(SafeMarkup::format('The configuration file name prefix @config_prefix exceeds the maximum character limit of @max_char.',array(
'@config_prefix'=>$config_prefix,
'@max_char'=>static::PREFIX_LENGTH,
)));
thrownewConfigPrefixLengthException("The configuration file name prefix $config_prefix exceeds the maximum character limit of ".static::PREFIX_LENGTH);
}
return$config_prefix;
}
...
...
@@ -158,7 +154,7 @@ public function setStorageClass($class) {
thrownewConfigEntityStorageClassException(SafeMarkup::format('@class is not \Drupal\Core\Config\Entity\ConfigEntityStorage or it does not extend it',['@class'=>$class]));
thrownewConfigEntityStorageClassException("$class is not \\Drupal\\Core\\Config\\Entity\\ConfigEntityStorage or it does not extend it");
@@ -31,21 +29,21 @@ class ImmutableConfig extends Config {
* {@inheritdoc}
*/
publicfunctionset($key,$value){
thrownewImmutableConfigException(SafeMarkup::format('Can not set values on immutable configuration !name:!key. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object',['!name'=>$this->getName(),'!key'=>$key]));
thrownewImmutableConfigException("Can not set values on immutable configuration {$this->getName()}:$key. Use \\Drupal\\Core\\Config\\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object");
}
/**
* {@inheritdoc}
*/
publicfunctionclear($key){
thrownewImmutableConfigException(SafeMarkup::format('Can not clear !key key in immutable configuration !name. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object',['!name'=>$this->getName(),'!key'=>$key]));
thrownewImmutableConfigException("Can not clear $key key in immutable configuration {$this->getName()}. Use \\Drupal\\Core\\Config\\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object");
}
/**
* {@inheritdoc}
*/
publicfunctionsave($has_trusted_data=FALSE){
thrownewImmutableConfigException(SafeMarkup::format('Can not save immutable configuration !name. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object',['!name'=>$this->getName()]));
thrownewImmutableConfigException("Can not save immutable configuration {$this->getName()}. Use \\Drupal\\Core\\Config\\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object");
}
/**
...
...
@@ -55,7 +53,7 @@ public function save($has_trusted_data = FALSE) {
* The configuration object.
*/
publicfunctiondelete(){
thrownewImmutableConfigException(SafeMarkup::format('Can not delete immutable configuration !name. Use \Drupal\Core\Config\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object',['!name'=>$this->getName()]));
thrownewImmutableConfigException("Can not delete immutable configuration {$this->getName()}. Use \\Drupal\\Core\\Config\\ConfigFactoryInterface::getEditable() to retrieve a mutable configuration object");
thrownewSchemaIncompleteException(SafeMarkup::format('Schema errors for @config_name with the following errors: @errors',array('@config_name'=>$name,'@errors'=>implode(', ',$text_errors))));
thrownewSchemaIncompleteException("Schema errors for $name with the following errors: ".implode(', ',$text_errors));
'Attempt to create a bundle with an ID longer than @max characters: @id.',array(
'@max'=>EntityTypeInterface::BUNDLE_MAX_LENGTH,
'@id'=>$this->id(),
)
));
thrownewConfigEntityIdLengthException("Attempt to create a bundle with an ID longer than ".EntityTypeInterface::BUNDLE_MAX_LENGTH." characters: $this->id().");
thrownew\LogicException(SafeMarkup::format('Missing bundle entity, entity type %type, entity id %bundle.',array('%type'=>$bundle_entity_type_id,'%bundle'=>$this->bundle)));
thrownew\LogicException("Missing bundle entity, entity type $bundle_entity_type_id, entity id {$this->bundle}.");