/// <summary>
 /// Installs the specified initializer.
 /// </summary>
 /// <param name="initializer">The initializer.</param>
 public static void Install(SiteInitializer initializer)
 {
     if (FrontendModuleInstaller.FrontendServiceExists())
     {
         FrontendModuleInstaller.InitialUpgrade(initializer);
     }
 }
Exemple #2
0
 /// <summary>
 /// Handles the Initialized event of the Bootstrapper.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Sitefinity.Data.ExecutedEventArgs"/> instance containing the event data.</param>
 protected virtual void Bootstrapper_Initialized(object sender, ExecutedEventArgs e)
 {
     if (e.CommandName == "Bootstrapped")
     {
         FrontendModuleInstaller.Bootstrapper_Initialized(this.initializers.Value);
     }
 }
 /// <summary>
 /// Handles the Initialized event of the Bootstrapper.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Sitefinity.Data.ExecutedEventArgs"/> instance containing the event data.</param>
 protected virtual void Bootstrapper_Initialized(object sender, ExecutedEventArgs e)
 {
     if (e.CommandName == "Bootstrapped")
     {
         using (new HealthMonitoring.MethodPerformanceRegion("Feather"))
         {
             FrontendModuleInstaller.Bootstrapper_Initialized(this.initializers.Value);
         }
     }
 }
Exemple #4
0
        /// <summary>
        /// Integrate the module into the system.
        /// </summary>
        public override void Load()
        {
            base.Load();

            this.ninjectDependencyResolver = this.CreateKernel();

            FrontendModuleInstaller.Initialize(this.DependencyResolver);

            Bootstrapper.Initialized -= this.Bootstrapper_Initialized;
            Bootstrapper.Initialized += this.Bootstrapper_Initialized;
        }
        /// <summary>
        /// Integrate the module into the system.
        /// </summary>
        public override void Load()
        {
            base.Load();

            this.InitializeDependencyResolver();

            FrontendModuleInstaller.Initialize();

            Bootstrapper.Initialized -= this.Bootstrapper_Initialized;
            Bootstrapper.Initialized += this.Bootstrapper_Initialized;
        }
Exemple #6
0
        /// <summary>
        /// Initializes the service with specified settings.
        /// </summary>
        /// <param name="settings">The settings.</param>
        public override void Initialize(ModuleSettings settings)
        {
            base.Initialize(settings);

            Bootstrapper.Initialized -= this.Bootstrapper_Initialized;
            Bootstrapper.Initialized += this.Bootstrapper_Initialized;

            this.ninjectDependencyResolver = this.CreateKernel();

            FrontendModuleInstaller.Initialize(this.DependencyResolver);

            App.WorkWith()
            .Module(settings.Name)
            .Initialize()
            .Configuration <FeatherConfig>();
        }
        private static void ClearToolboxItems()
        {
            var configManager   = ConfigManager.GetManager();
            var toolboxesConfig = configManager.GetSection <ToolboxesConfig>();

            var pagesToolbox = toolboxesConfig.Toolboxes["PageControls"];

            if (pagesToolbox == null)
            {
                return;
            }

            var mvcWidgetsSection = pagesToolbox.Sections.FirstOrDefault <ToolboxSection>(s => s.Name == "MvcWidgets");

            if (mvcWidgetsSection != null)
            {
                FrontendModuleInstaller.RemoveToolboxItemIfExists(mvcWidgetsSection, "ContentBlock");
                FrontendModuleInstaller.RemoveToolboxItemIfExists(mvcWidgetsSection, "Navigation");
                FrontendModuleInstaller.RemoveToolboxItemIfExists(mvcWidgetsSection, "News");

                configManager.SaveSection(toolboxesConfig);
            }
        }
 private static void InitialUpgrade(SiteInitializer initializer)
 {
     FrontendModuleInstaller.RemoveFrontendService();
     FrontendModuleInstaller.RenameControllers(initializer);
     FrontendModuleInstaller.ClearToolboxItems();
 }
Exemple #9
0
 /// <summary>
 /// Installs the specified initializer.
 /// </summary>
 /// <param name="initializer">The initializer.</param>
 public override void Install(SiteInitializer initializer)
 {
     FrontendModuleInstaller.Install(initializer);
 }