Commit Graph

33 Commits

Author SHA1 Message Date
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
8e3cb8f3e6 Removed MembershipHelper from UmbracoHelper 2020-02-27 09:56:35 +01:00
Bjarke Berg
c335a8dbb5 Introduced interface on UmbracoContext 2020-02-09 19:05:39 +01:00
Bjarke Berg
d2443ea4c0 AB3677 - Removed the Core.Composing.Current.. Moved stuff to Web.Composing.Current and injected more stuff. 2020-01-07 13:08:21 +01:00
Shannon
717efb6b09 Removes notes 2019-02-20 20:37:10 +11: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
Chris Houston
0b6ba5aa52 Temp8 - Fixing spelling / typos etc in Umbraco.Web (#4148) 2019-01-26 16:52:19 +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
710ec704b3 Merge branch temp8 into temp8-di2690 2018-12-07 09:52:46 +01:00
Shannon
1eba69b070 Fixes build with ctor change to UmbracoHelper 2018-12-05 16:59:33 +11:00
Stephan
49a0b68b28 IContainer is IRegister+IFactory 2018-11-28 11:05:41 +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
db2ad87784 Removed named service reference from repo ctors. Now registered with factory method that looks up services by name instead. 2018-06-20 19:57:42 +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
c76403077f Normalize cr/lf/tab 2017-07-20 11:21:28 +02:00
Stephan
1f5c47f029 Move Plugins to Composing 2017-05-30 15:56:30 +02:00
Stephan
824cf30e2e PluginManager TLC from v7 2017-03-05 11:59:11 +01:00
Stephan
7f39f7748f Persistence reorg, killed DatabaseContext 2016-12-16 17:56:10 +01:00
Stephan
0597eea72b Resvolution - Components, Runtime & Booting 2016-09-19 16:33:43 +02:00
Shannon
f87764f9d5 a bit better support for unit testing controllers with ctor overloads 2015-04-13 20:13:57 +10: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
77e672aec1 Exposes an ILogger property called Logger on all relevant base classes 2015-01-07 17:38:25 +11:00
Shannon
3ef9635406 Fixes: U4-4010 Member and user session gets mixed - fixes how we detect a back office request + unit tests and added new IsBackOffice attribute 2014-01-15 13:17:38 +11:00
Shannon Deminick
63159702e3 Implemented UmbracoApiController as a plugin and is auto routed 2013-02-26 03:45:39 +06:00
Shannon Deminick
020fa577f0 Fixes: #U4-1357 - more properties to expose context objects on SurfaceController and RenderMvcController base classes. 2012-12-28 18:31:10 +03:00
Shannon Deminick
f7f83bc057 Changed IPublishedContentStore and IPublishedMediaStore back to internal as we don't need to expose these yet. Instead have added
an UmbracoHelper property to the PluginController class which will expose any methods needed by devs to retreive media or content.
Have updated UmbracoHelper with loads of new helpful methods and moved the Wrap methods to HtmlHelper extensions because this is purely to
do with rendering html (have written unit tests for it too).
Updated some 'library' methods to proxy calls to UmbracoHelper so we only have to maintain one set of code.
Added a convenience property to UmbracoContext to return the current NiceUrlProvider so you don't have to go through the RoutingContext to get it.
2012-09-27 08:30:35 +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