def METHOD_NAME(self):
    enabled = None
    if self.opts.enable_resolving:
        enabled = True
        logger.info(_("Aliases are now enabled"))
    if self.opts.disable_resolving:
        enabled = False
        logger.info(_("Aliases are now disabled"))
    if enabled is not None:
        if not os.path.exists(dnf.cli.aliases.ALIASES_CONF_PATH):
            open(dnf.cli.aliases.ALIASES_CONF_PATH, 'w').close()
        dnf.conf.BaseConfig.write_raw_configfile(
            dnf.cli.aliases.ALIASES_CONF_PATH,
            'main', None, {'enabled': enabled})
        if not self.aliases_base._disabled_by_environ():
            self.aliases_base.enabled = enabled