src/EntityHelper/CustomFieldsGetSet.php
private static function checkCustomFieldExists($owningEntity, $key)
    {
        if (is_null(self::getEntityType($owningEntity, $key))) {
            $msg = sprintf('CustomField "%s" does not exist for entity class "%s"', $key, ClassUtils::getClass($owningEntity));
            throw new \LogicException($msg);
        }
    }
private static function checkCustomFieldExists($owningEntity, $key)
    {
        if (is_null(self::getEntityType($owningEntity, $key))) {
            $msg = sprintf('CustomField "%s" does not exist for entity class "%s"', $key, ClassUtils::getClass($owningEntity));
            throw new \LogicException($msg);
        }
    }
private static function checkCustomFieldExists ( $ owningEntity , $ key ) { if ( is_null ( self :: getEntityType ( $ owningEntity , $ key ) ) ) { $ msg = sprintf ( 'CustomField "%s" does not exist for entity class "%s"' , $ key , ClassUtils :: getClass ( $ owningEntity ) ) ; throw new \ LogicException ( $ msg ) ; } }
Throws an error if the entity does not contain the custom field.

@param object $owningEntity
@param string $key

@throws \LogicException
Throws an error if the entity does not contain the custom field .