Ejemplo n.º 1
0
        /// <summary>
        /// Gets the model of the designer.
        /// </summary>
        private IDesignerModel GetModel(string widgetName)
        {
            var constructorParameters = new Dictionary <string, object>
            {
                { "views", this.GetPartialViews() }
            };

            return(ControllerModelFactory.GetModel <IDesignerModel>(typeof(DesignerController), constructorParameters));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes the model.
        /// </summary>
        /// <returns>
        /// The <see cref="ILoginStatusModel"/>.
        /// </returns>
        private ILoginStatusModel InitializeModel()
        {
            var parameters = new Dictionary <string, object>()
            {
                { "currentPageUrl", this.GetCurrentPageUrl() }
            };

            return(ControllerModelFactory.GetModel <ILoginStatusModel>(this.GetType(), parameters));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes the model.
        /// </summary>
        private ISearchResultsModel InitializeModel()
        {
            var languages         = SystemManager.CurrentContext.AppSettings.DefinedFrontendLanguages;
            var constructorParams = new Dictionary <string, object>
            {
                { "languages", languages }
            };

            return(ControllerModelFactory.GetModel <ISearchResultsModel>(this.GetType(), constructorParams));
        }
        /// <summary>
        /// Gets the model of the designer.
        /// </summary>
        private IGridDesignerModel GetModel(string gridTitle, string controlId)
        {
            var constructorParameters = new Dictionary <string, object>
            {
                { "gridTitle", gridTitle },
                { "controlId", controlId }
            };

            return(ControllerModelFactory.GetModel <IGridDesignerModel>(typeof(GridDesignerController), constructorParameters));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes the model.
        /// </summary>
        /// <returns>
        /// The <see cref="ISearchBoxModel"/>.
        /// </returns>
        private ISearchBoxModel InitializeModel()
        {
            var constructorParams = new Dictionary <string, object>
            {
                { "suggestionsRoute", RouteHelper.ResolveUrl("/restapi/search/suggestions", UrlResolveOptions.Rooted) },
                { "minSuggestionLength", this.GetMinSuggestLength() },
                { "suggestionFields", "Title,Content" },
                { "language", this.GetCurrentUILanguage() }
            };

            return(ControllerModelFactory.GetModel <ISearchBoxModel>(this.GetType(), constructorParams));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Gets the model of the designer.
        /// </summary>
        private IDesignerModel GetModel(string widgetName)
        {
            var constructorParameters = new Dictionary <string, object>
            {
                { "views", this.GetPartialViews() },
                { "viewLocations", this.GetPartialViewLocations() },
                { "widgetName", widgetName },
                { "preselectedView", this.Request != null ? this.Request["view"] : null }
            };

            return(ControllerModelFactory.GetModel <IDesignerModel>(typeof(DesignerController), constructorParameters));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Initializes the content block model.
        /// </summary>
        /// <returns>
        /// The <see cref="IContentBlockModel"/>.
        /// </returns>
        private IContentBlockModel InitializeModel()
        {
            var constructorParameters = new Dictionary <string, object>
            {
                { "providerName", this.ProviderName },
                { "content", this.content },
                { "sharedContentId", this.SharedContentID },
                { "containerType", ((IHasContainerType)this).ContainerType },
                { "wrapperCssClass", this.WrapperCssClass }
            };

            return(ControllerModelFactory.GetModel <IContentBlockModel>(this.GetType(), constructorParameters));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Initializes the model.
        /// </summary>
        /// <returns>
        /// The <see cref="INavigationModel"/>.
        /// </returns>
        private INavigationModel InitializeModel()
        {
            var selectedPages         = JsonSerializer.DeserializeFromString <SelectedPageModel[]>(this.SerializedSelectedPages);
            var constructorParameters = new Dictionary <string, object>
            {
                { "selectionMode", this.SelectionMode },
                { "selectedPageId", this.SelectedPageId },
                { "selectedPages", selectedPages },
                { "levelsToInclude", this.LevelsToInclude },
                { "showParentPage", this.ShowParentPage },
                { "cssClass", this.CssClass },
                { "openExternalPageInNewTab", this.OpenExternalPageInNewTab }
            };

            return(ControllerModelFactory.GetModel <INavigationModel>(this.GetType(), constructorParameters));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Gets the model of the designer.
        /// </summary>
        private IDesignerModel GetModel(string widgetName, Guid controlId)
        {
            var viewFilesMappgings = new Dictionary <string, string>();

            var constructorParameters = new Dictionary <string, object>
            {
                { "views", this.GetPartialViews(ref viewFilesMappgings) },
                { "viewLocations", this.GetPartialViewLocations() },
                { "widgetName", widgetName },
                { "controlId", controlId },
                { "preselectedView", this.Request != null ? this.Request["view"] : null },
                { "viewFilesMappings", viewFilesMappgings }
            };

            return(ControllerModelFactory.GetModel <IDesignerModel>(typeof(DesignerController), constructorParameters));
        }
Ejemplo n.º 10
0
 private IListsModel InitializeModel()
 {
     return ControllerModelFactory.GetModel<IListsModel>(this.GetType());
 }
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="ILoginFormModel"/>.
 /// </returns>
 private ILoginFormModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <ILoginFormModel>(this.GetType()));
 }
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="IChangePasswordModel"/>.
 /// </returns>
 private IChangePasswordModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IChangePasswordModel>(this.GetType()));
 }
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="IAccountActivationModel"/>.
 /// </returns>
 private IAccountActivationModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IAccountActivationModel>(this.GetType()));
 }
 /// <summary>
 /// Gets the model of the designer.
 /// </summary>
 private IPersonalizationDesignerModel GetModel()
 {
     return(ControllerModelFactory.GetModel <IPersonalizationDesignerModel>(typeof(PersonalizationDesignerController)));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns></returns>
 protected virtual IBreadcrumbModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IBreadcrumbModel>(this.GetType()));
 }
 private IHierarchicalTaxonomyModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IHierarchicalTaxonomyModel>(this.GetType()));
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="ISocialShareModel"/>.
 /// </returns>
 protected virtual ISocialShareModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <ISocialShareModel>(this.GetType()));
 }
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="IDynamicContentModel"/>.
 /// </returns>
 private IDynamicContentModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IDynamicContentModel>(this.GetType()));
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes the model instance.
 /// </summary>
 /// <returns></returns>
 private IJavaScriptModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IJavaScriptModel>(this.GetType()));
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="IProfileModel"/>.
 /// </returns>
 private IProfileModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IProfileModel>(this.GetType()));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="IVideoGalleryModel"/>.
 /// </returns>
 private IVideoGalleryModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IVideoGalleryModel>(this.GetType()));
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="IUsersListModel"/>.
 /// </returns>
 private IUsersListModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IUsersListModel>(this.GetType()));
 }
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="ILanguageSelectorModel"/>.
 /// </returns>
 private ILanguageSelectorModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <ILanguageSelectorModel>(this.GetType()));
 }
 /// <summary>
 /// Initializes the model.
 /// </summary>
 /// <returns>
 /// The <see cref="IRegistrationModel"/>.
 /// </returns>
 private IRegistrationModel InitializeModel()
 {
     return(ControllerModelFactory.GetModel <IRegistrationModel>(this.GetType()));
 }