Class MediaTreeController
- Namespace
- Umbraco.Cms.Web.BackOffice.Trees
- Assembly
- Umbraco.Web.BackOffice.dll
[Authorize(Policy = "SectionAccessForMediaTree")]
[Tree("media", "media")]
public class MediaTreeController : ContentTreeControllerBase, ITree, ISearchableTree, IDiscoverable, ITreeNodeController
- Inheritance
-
MediaTreeController
- Implements
-
ITreeISearchableTreeIDiscoverable
- Inherited Members
Constructors
MediaTreeController(ILocalizedTextService, UmbracoApiControllerTypeCollection, IMenuItemCollectionFactory, IEntityService, IBackOfficeSecurityAccessor, ILogger<MediaTreeController>, ActionCollection, IUserService, IDataTypeService, UmbracoTreeSearcher, IMediaService, IEventAggregator, AppCaches)
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
localizedTextServiceILocalizedTextServiceumbracoApiControllerTypeCollectionUmbracoApiControllerTypeCollectionmenuItemCollectionFactoryIMenuItemCollectionFactoryentityServiceIEntityServicebackofficeSecurityAccessorIBackOfficeSecurityAccessorloggerILogger<MediaTreeController>actionCollectionActionCollectionuserServiceIUserServicedataTypeServiceIDataTypeServicetreeSearcherUmbracoTreeSearchermediaServiceIMediaServiceeventAggregatorIEventAggregatorappCachesAppCaches
Properties
RecycleBinId
Returns the
protected override int RecycleBinId { get; }
Property Value
RecycleBinSmells
Returns true if the recycle bin has items in it
protected override bool RecycleBinSmells { get; }
Property Value
UmbracoObjectType
protected override UmbracoObjectTypes UmbracoObjectType { get; }
Property Value
- UmbracoObjectTypes
UserStartNodes
Returns the user's start node for this tree
protected override int[] UserStartNodes { get; }
Property Value
- int[]
Methods
GetSingleTreeNode(IEntitySlim, string, FormCollection?)
Creates a tree node for a content item based on an UmbracoEntity
protected override TreeNode GetSingleTreeNode(IEntitySlim entity, string parentId, FormCollection? queryStrings)
Parameters
entityIEntitySlimparentIdstringqueryStringsFormCollection
Returns
- TreeNode
HasPathAccess(string, FormCollection)
Returns true or false if the current user has access to the node based on the user's allowed start node (path) access access
protected override bool HasPathAccess(string id, FormCollection queryStrings)
Parameters
idstringqueryStringsFormCollection
Returns
PerformGetMenuForNode(string, FormCollection)
protected override ActionResult<MenuItemCollection> PerformGetMenuForNode(string id, FormCollection queryStrings)
Parameters
idstringqueryStringsFormCollection
Returns
- ActionResult<MenuItemCollection>
SearchAsync(string, int, long, string?)
public Task<EntitySearchResults> SearchAsync(string query, int pageSize, long pageIndex, string? searchFrom = null)
Parameters
Returns
- Task<EntitySearchResults>