public function create(array
$data) { $this->
checkPrivilege('create'
);
if (empty($data['key'
])) { throw new ParameterMissingException('The parameter key is required for an object translation.'
);
} $this->
checkRequirements($data);
return $this->
saveTranslation($data);
} /**
* Creates a new translation. If a translation already exists for
* the passed object, the translations will be merged.
* The reason for no difference between the update and create function
* is the identifier of a translation.
* A translation will be identified over the following parameters:
* - type => Type of the translation
* - key => Identifier of the translated object (like article, variant, ...)
* - shopId => Identifier of the shop entity.
*
* This three parameters are required in each function: create, update, delete / *-byNumber
*
* @throws ParameterMissingException
*
* @return TranslationModel
*/