Elitsa Marinovska
0eefbfd449
Migrating SurfaceController
2020-05-11 20:29:38 +02:00
Elitsa Marinovska
84f19e093a
NetCore: Refactor internal usages of UmbracoHelper ( #7744 )
...
* Removing properties related to IPublishedContentQuery, ITagQuery, ICultureDictionaryFactory, IUmbracoComponentRenderer from UmbracoHelper and using the corresponding private fields instead. Removing Media related methods
* Removed UmbracoHelper from UmbracoApiControllerBase
* Removed UmbracoHelper references
* Inject the needed Interfaces to classes that previously used UmbracoHelper to get the same functionality
* Fixed tests referencing UmbracoHelper
* Adding Media methods back
* Cleanup and moved UmbracoHelper from more base classes, when not used + simplified tests
* Reintroduced some methods..
* Reintroduced some methods..
* Reintroducing last missing bits
Co-authored-by: Bjarke Berg <mail@bergmania.dk >
2020-03-03 11:59:17 +01:00
Bjarke Berg
c6e1e7b3e5
Untangled UrlProvider from UmbracoContext
2020-02-14 13:06:10 +01:00
Bjarke Berg
1770a0abec
Inject IUmbracoContextAccessor instead of UmbracoContext
2019-02-14 12:40:45 +01:00
Shannon
7b55d2f1b2
New IMacroRenderer and ITemplateRenderer and hides underlying logic for these in internal classes. Massively cleans up the macro rendering logic (almost makes sense now), removes unused macro code, injects UmbracoHelper wherever it's needed (not creating manually), fixes UmbracoHelper to have it's services injected, no more empty services, allows setting the AssignedContentItem on the UmbracoHelper and ensures it's lifespan is Transient, updates all corresponding ctors. Fixes macro rendering, ensures the correct culture variation is assigned, and that we can render macros for any given IPublishedContent, not just the one assigned in the request.
2019-01-31 15:09:31 +11:00
Stephan
9522ee826f
Deal with fixme in Umbraco.Web
2019-01-21 16:01:37 +01:00
Stephan
3982732b7d
Fix merge + cleanup
2019-01-18 15:05:20 +01:00
Stephan
67e4703821
CacheHelper becomes AppCaches
2019-01-17 08:34:29 +01:00
Stephan
c23c7749b4
Composition fixes
2018-11-27 14:04:08 +01:00
Stephan
57d7888740
Merge branch temp8 into temp8-di
2018-07-06 17:49:02 +02:00
Stephan
7a615133ff
Renormalize
2018-06-29 19:52:40 +02:00
Lars-Erik Aabech
e4aca5f5d8
Several property injections removed from Mvc artifacts and base classes
2018-06-19 18:53:25 +02:00
Stephan
829d995154
Simplicity
2017-10-31 12:50:30 +01:00
Stephan
c76403077f
Normalize cr/lf/tab
2017-07-20 11:21:28 +02:00
Stephan
0597eea72b
Resvolution - Components, Runtime & Booting
2016-09-19 16:33:43 +02:00
Stephan
d08412c0fe
Refactor - IPublishedContent, converters, fragments
2016-07-21 09:37:40 +02:00
Shannon
640b2c0ee0
Moves strings to constants, adds ControllerContextExtensions to get the UmbracoContext from the hierarchy of ControllerContext's, changes RenderModelBinder to use this method to get the UmbracoContext, changes UmbracoViewPageOfTModel to use this method to get the UmbracoContext, adds RouteDataExtensions to get the UmbracoContext from routedata, adds extension methods on the HttpContext to get the UmbracoContext from it.
2016-02-16 11:17:47 +01:00
Shannon
f87764f9d5
a bit better support for unit testing controllers with ctor overloads
2015-04-13 20:13:57 +10:00
Shannon
a1c7352da1
Merge branch 'dev-v7' into 7.3.0
...
Conflicts:
src/Umbraco.Core/Umbraco.Core.csproj
src/Umbraco.Tests/Integration/GetCultureTests.cs
src/Umbraco.Tests/Models/ContentTests.cs
src/Umbraco.Tests/Models/ContentTypeTests.cs
src/Umbraco.Tests/Persistence/Repositories/ContentTypeRepositoryTest.cs
src/Umbraco.Tests/Routing/DomainsAndCulturesTests.cs
src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs
src/Umbraco.Tests/Services/ContentTypeServiceTests.cs
src/Umbraco.Web/Models/ContentExtensions.cs
src/Umbraco.Web/Mvc/SurfaceController.cs
2015-04-09 16:50:07 +10:00
AndyButland
437e7f0ffc
Removed unused usings from previous commit
2015-04-01 23:29:43 +02:00
AndyButland
afa6c35bb5
Added overloads to RedirectToUmbracoPage methods to allow passing of a querystring
2015-04-01 23:27:20 +02:00
Shannon
c760a7c50d
Merge branch 'dev-v7-7.3.0-UmbHelperInterfaces' of https://github.com/Shazwazza/Umbraco-CMS into Shazwazza-dev-v7-7.3.0-UmbHelperInterfaces
...
Conflicts:
src/Umbraco.Web/Umbraco.Web.csproj
2015-02-18 17:14:55 +01:00
Shannon
1cb0cd296c
Decoupling more things, mostly to do with the PluginManager and logging which now requires an IServiceProvider so have created a simple instance of that.
2015-01-16 15:47:44 +11:00
Shannon
defc9d3bc2
Updated all repo's to have their correct ctor's with their correct dependencies. Updated them all to accept ILogger updated all other dependencies with the same without breaking anything since all is internal, or obsoleted other public methods. Updates lots of the tests with mock instances instead, now more tests have less singleton dependencies, easier to test, much clearer and more IoC driven. Updated unit tests to supply the ILogger for required objects, tests should run faster now since most things are just mocked.
2015-01-09 10:51:15 +11:00
Shannon
f5ee02a3e9
Updates the membership partial view templates to redirect to current page by default but allows this to be overridden. Creates a new RedirectToCurrentUmbracoUrl method which is slightly diff from RedirectToCurrentUmbracoPage since it doesn't care about the actual page item rendering, just the currently rendered URL which is useful if coming from a rewritten URL (which is what happens with public access rewrites)
2014-02-13 13:30:32 +11:00
Shannon
9959ff667e
publicizes MembershipHelper and exposes it on the various base classes: SurfaceController, UmbracoApiController and UmbracoUserControl as the property "Members", will add more helper methods.
2014-01-28 16:58:55 +11:00
Stephan
32e3048717
Core.Attempt - refactor Succ() into Succeed()
2013-09-11 09:30:00 +02:00
Stephan
85ab96f71a
Core.Attempt - refactor and cleanup
2013-09-10 17:56:47 +02:00
Shannon
c228c24ba5
Creted MergeParentContextViewData filter, this is by default applied to SurfaceController's and the PartialViewMacroController. Now if you are rendering a partial view macro or a child action from a SurfaceController and are putting data into ViewData on a POST, you don't have to access the ViewData from the ParentViewContext.
2013-08-30 12:03:16 +10:00
Shannon Deminick
e6fcdc8dc6
Fixes: #U4-2279
2013-05-28 14:16:39 -10:00
Shannon Deminick
187af3e361
Fixed merge issue
2013-03-11 21:23:35 +06:00
Shannon Deminick
c6f29a50d6
Merge with 4.11.6
2013-03-11 21:17:57 +06:00
Shannon Deminick
28c55320a1
Updates the pull request for handling macro errors.
...
Backports fixes for partial view macros from 6.x - U4-1488, U4-1844, U4-1730, U4-1843
2013-03-11 20:11:11 +06:00
Shannon Deminick
d48e339b81
Fixes: #U4-1844, #U4-1730, #U4-1843
2013-03-06 04:12:28 +06:00
Shannon Deminick
e096890400
Fixes: #U4-1537
2013-02-19 20:12:13 +06:00
Shannon Deminick
c0b5525dd7
Removed 'Boot' method from WebBootManager as it was never supposed to be there in the first place.
...
Removed test code from 'SurfaceController'.
Added comments to IApplicationEventHandler.
2013-01-18 02:31:51 +03:00
Shannon Deminick
c2d0e255df
Fixes: #U4-1537
2013-02-19 20:17:17 +06:00
Shannon Deminick
0db6c2cc11
Fixed issue that locally declared SurfaceControllers are routed through 'umbraco' area, this should not have been the case.
...
Created new CacheHelper which replaces the old Cache class and is accessible via the UmbracoContext.
Added new CachedPartial extension method to be able to cache the output of your partials (also by page and by member)
Added mew CacheHelperApplicationEventListener in order to automatically clear the partials cache when content is published, media or members is saved.
2012-10-31 11:36:22 +06:00
Shannon Deminick
ffd14c839b
After talks with morten and stephane, this renames
...
DocumentRequest -> PublishedContentRequest
2012-10-02 01:40:19 +05:00
Shannon Deminick
4f011e0390
Some naming tweaks to fix up from previous commit.
2012-10-02 01:36:42 +05:00
Shannon Deminick
053df24640
After talks with morten and stephane, this renames
...
IDocument -> IPublishedContent
DynamicDocument -> DynamicPublishedContent
2012-10-02 01:35:39 +05:00
Shannon Deminick
45c335702d
Updated view engine to look only in App_Plugins/ not App_Plugins/Packages/.
...
Updated view engine to automatically create the required razor web.config in the packages
Views folder if it is not there already.
2012-10-01 23:43:47 +05:00
Shannon Deminick
53a3ad24e6
comments out test surface controllers for now
2012-09-26 13:44:23 +07:00
Shannon Deminick
5ece0b5af0
Surface controllers now auto-routing, both locally declared and plugin types (which require a [PluginController] attribute and an Area Name assigned).
...
BeginUmbracoForm working for both local and plugin SurfaceControllers. SurfaceController class now inherits from PluginController which exposes all things a dev would
need including making IPublishedContentStore and IPublishedMediaStore public which can be accessed simply by properties on the controller.
Updated web.config for views to include Umbraco.Web namespace for all of our helper methods.
BeginUmbracoForm now has many more overrides for which you can specify a type or a generic type (we no longer require GUIDs :)
2012-09-26 13:42:03 +07:00
Shannon Deminick
332b42aa49
Changed how surface controllers are routed: because we don't load plugins in via App_Plugins/[PackageName] like we did in v5 which meant that we can autoroute all plugin controllers with their own areas, in v4 we have to do something different.
...
Instead (because we still want areas), we have an attribute called PluginControllerAttribute which allows a dev to assign an area name as a string. A package developer should always ensure that all of their plugin controllers are assigned to the same
area. This also lets us get rid of the GUID id part of the plugin (hopefully we can leave it out, just need to run some tests). Since we have areas, package devs can then put their views into
their own folders and not clutter up the local devs ~/Views folder. Perhaps we use App_Plugins/[PackageName] for the views like we did in v5 but need to ask on the mail list. Otherwise it will be the standard MVC:
~/Areas/[AreaName]/Views which will still also clutter up the local devs view folder if they are using Areas.
2012-09-26 11:04:07 +07:00
Shannon Deminick
7b7e3b82f1
Started adding tests for surface controller routing. They are working but not quite correctly yet.
2012-09-25 13:33:47 +07:00
Shannon Deminick
0b7f04ab37
Added all code to support auto-routing surface controllers and started implementing the code for
...
BeginUmbracoForm.
2012-09-25 13:09:59 +07:00