Sidebar Media Item

<sw-sidebar-media-item>

ready
The sw-sidebar-media-item component is used everywhere you need media objects outside of the media manager. Use the additional properties to filter the shown media. Just pass a object created by the CriteriaFactory.

Usage

<sw-sidebar-media-item :useAdditionalSearchCriteria="true"
                       :additionalSearchCriteria="getCriteria">
   <template slot="context-menu-items" slot-scope="media">
      <sw-context-menu-item @click="onAddItemToProduct(media.mediaItem)">
         Lorem ipsum dolor sit amet
      </sw-context-menu-item>
   </template>
</sw-sidebar-media-item>

Component properties

Property name Type Default
initialFolderId String
isParentLoading Boolean false
additionalSearchCriteria Object

Methods

Method name Parameters
createdComponent No parameters
initializeContent No parameters
getSubFolders No parameters
handleFolderGridItemDelete No parameters
handleMediaGridItemDelete No parameters
onLoadMore No parameters
extendList No parameters
getList No parameters
getListingParams No parameters
openContent No parameters
onNavigateToFolder folderId

Imports

  • src/core/factory/criteria.factory
  • ./sw-sidebar-media-item.html.twig
  • ./sw-sidebar-media-item.scss

Watcher

  • term
  • initialFolderId
  • mediaFolderId
  • isParentLoading

Twig blocks

  • sw_sidebar_media_item_search_field
  • sw_sidebar_media_item_folder_navigation
  • sw_sidebar_media_item_media_item_list_folder_item
  • sw_sidebar_media_item_context_items
  • sw_sidebar_media_item_media_item_list_media_item
  • sw_sidebar_media_item_load_more_button
  • sw_sidebar_media_item_media_item_list
  • sw_sidebar_media_item_loader
  • sw_sidebar_media_item_content
  • sw_sidebar_media_item

Slots

  • context-menu-items