/** * {@inheritdoc} */ protected function loadConfig(array $config, $class) { $package = parent::loadConfig($config, $class); if ($package->getType() != 'theme') { throw new UnexpectedValueException('Package ' . $config['name'] . ' has no type "theme" defined.'); } return $package; }