/** * Gets config id for the given model * * @param EntityConfigModel|FieldConfigModel $model * @param string $scope * @return ConfigIdInterface */ public function getConfigIdByModel($model, $scope) { if ($model instanceof FieldConfigModel) { return new FieldConfigId($scope, $model->getEntity()->getClassName(), $model->getFieldName(), $model->getType()); } else { return new EntityConfigId($scope, $model->getClassName()); } }