code: protected function detectNamespace($settings)
      {
          foreach ($this->options->getNamespaces() as $namespaceOptions) {
              $namespaceEntityClass = $namespaceOptions->getEntityClass();
              if ($settings instanceof $namespaceEntityClass) {
                  return $namespaceOptions->getName();
              }
          }
  
          throw new Exception\InvalidArgumentException('Unknown Settings namespace');
      }
docs: Tries to detect namespace from modal class
  
  @param  object                             $settings
  @return string
  @throws Exception\InvalidArgumentException