/** * Validate translatable fields - ensure that the document has a * translator strategy in place. * * @throws MappingException if there is an inconsistency with translation */ public function validateTranslatables() { if (count($this->translatableFields) > 0) { if (null === $this->translator) { throw MappingException::noTranslatorStrategy($this->name, $this->translatableFields); } } }