Beispiel #1
0
 public NewsPlugin(ISettingService settingService, NewsSettings NewsSettings, IWebHelper webHelper, ILocalizationService localizationService)
 {
     this._settingService      = settingService;
     this._NewsSettings        = NewsSettings;
     this._webHelper           = webHelper;
     this._localizationService = localizationService;
 }
Beispiel #2
0
        public override void Install()
        {
            var settings = new NewsSettings
            {
                QtdNewsPosts = 3,
                WidgetZone   = "home_page_before_news"
            };

            _settingService.SaveSetting(settings);

            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Widgets.News.Fields.WidgetZone", "WidgetZone name");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Widgets.News.Fields.WidgetZone.Hint", "Enter the WidgetZone name that will display the HTML code.");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Widgets.News.Fields.QtdNewsPosts", "Number of News items");
            _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Widgets.News.Fields.QtdNewsPosts.Hint", "Enter the number of News items that will be displayed in view.");

            base.Install();
        }