View Source
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Assembly: Umbraco.Web.BackOffice.dll
[Authorize(Policy = "SectionAccessForMediaTree")]
public class MediaTreeController : ContentTreeControllerBase, ITreeNodeController
Constructors
View Source
Declaration
public MediaTreeController(ILocalizedTextService localizedTextService, UmbracoApiControllerTypeCollection umbracoApiControllerTypeCollection, IMenuItemCollectionFactory menuItemCollectionFactory, IEntityService entityService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, ILogger<MediaTreeController> logger, ActionCollection actionCollection, IUserService userService, IDataTypeService dataTypeService, UmbracoTreeSearcher treeSearcher, IMediaService mediaService, IEventAggregator eventAggregator, AppCaches appCaches)
Parameters
Type |
Name |
Description |
ILocalizedTextService |
localizedTextService |
|
UmbracoApiControllerTypeCollection |
umbracoApiControllerTypeCollection |
|
IMenuItemCollectionFactory |
menuItemCollectionFactory |
|
IEntityService |
entityService |
|
IBackOfficeSecurityAccessor |
backofficeSecurityAccessor |
|
Microsoft.Extensions.Logging.ILogger<MediaTreeController> |
logger |
|
ActionCollection |
actionCollection |
|
IUserService |
userService |
|
IDataTypeService |
dataTypeService |
|
UmbracoTreeSearcher |
treeSearcher |
|
IMediaService |
mediaService |
|
IEventAggregator |
eventAggregator |
|
AppCaches |
appCaches |
|
Properties
View Source
Declaration
protected override int RecycleBinId { get; }
Property Value
Type |
Description |
System.Int32 |
|
View Source
Declaration
protected override bool RecycleBinSmells { get; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
Declaration
protected override UmbracoObjectTypes UmbracoObjectType { get; }
Property Value
Type |
Description |
UmbracoObjectTypes |
|
View Source
Declaration
protected override int[] UserStartNodes { get; }
Property Value
Type |
Description |
System.Int32[] |
|
Methods
View Source
Creates a tree node for a content item based on an UmbracoEntity
Declaration
protected override TreeNode GetSingleTreeNode(IEntitySlim entity, string parentId, FormCollection queryStrings)
Parameters
Type |
Name |
Description |
IEntitySlim |
entity |
|
System.String |
parentId |
|
Microsoft.AspNetCore.Http.FormCollection |
queryStrings |
|
Returns
Type |
Description |
TreeNode |
|
View Source
Returns true or false if the current user has access to the node based on the user's allowed start node (path) access
access
Declaration
protected override bool HasPathAccess(string id, FormCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Microsoft.AspNetCore.Http.FormCollection |
queryStrings |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Declaration
protected override ActionResult<MenuItemCollection> PerformGetMenuForNode(string id, FormCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Microsoft.AspNetCore.Http.FormCollection |
queryStrings |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.ActionResult<MenuItemCollection> |
|
View Source
Declaration
public async Task<EntitySearchResults> SearchAsync(string query, int pageSize, long pageIndex, string searchFrom = null)
Parameters
Type |
Name |
Description |
System.String |
query |
|
System.Int32 |
pageSize |
|
System.Int64 |
pageIndex |
|
System.String |
searchFrom |
|
Returns
Type |
Description |
Task<EntitySearchResults> |
|