コード例 #1
0
 public PollsPlugin(ISettingService settingService, PollsSettings pollsSettings, IWebHelper webHelper, ILocalizationService localizationService)
 {
     this._settingService      = settingService;
     this._pollsSettings       = pollsSettings;
     this._webHelper           = webHelper;
     this._localizationService = localizationService;
 }
コード例 #2
0
        public override void Install()
        {
            var settings = new PollsSettings
            {
                QtdPolls   = 1,
                WidgetZone = "home_page_before_poll"
            };

            _settingService.SaveSetting(settings);

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

            base.Install();
        }