Craft Themes (4.x)

ViewModesHelper
in package

Table of Contents

getAllProductsViewModes()  : array<string|int, mixed>
Get all view modes defined for all product types
getAllSectionsViewModes()  : array<string|int, mixed>
Get all view modes defined for all sections
getAllVariantsViewModes()  : array<string|int, mixed>
Get all view modes defined for all product types
getCategoryGroupViewModes()  : array<string|int, mixed>
Get view modes available for a Categories field and a theme
getProductsViewModes()  : array<string|int, mixed>
Get view modes available for a Products field and a theme
getProductViewModes()  : array<string|int, mixed>
Get all view modes defined for a product type uid
getSectionsViewModes()  : array<string|int, mixed>
Get view modes available for an Entries field and a theme
getSectionViewModes()  : array<string|int, mixed>
Get all view modes defined for one section
getSingleEntriesViewModes()  : array<string|int, mixed>
Get all view modes defined for single sections
getTagGroupViewModes()  : array<string|int, mixed>
Get view modes available for a Tag field and a theme
getUserPhotoViewModes()  : array<string|int, mixed>
Get view modes for the user photo volume
getUserViewModes()  : array<string|int, mixed>
Get users view modes available for a theme
getVariantsViewModes()  : array<string|int, mixed>
Get view modes available for a Products field and a theme
getVariantViewModes()  : array<string|int, mixed>
Get variant view modes available for a product type and a theme
getVolumesViewModes()  : array<string|int, mixed>
Get view modes available for an Assets field and a theme
getAllVolumes()  : array<string|int, mixed>
Get all defined volumes on a field

Methods

getAllProductsViewModes()

Get all view modes defined for all product types

public static getAllProductsViewModes(ThemeInterface $theme) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
Tags
since
3.1.0
Return values
array<string|int, mixed>

getAllSectionsViewModes()

Get all view modes defined for all sections

public static getAllSectionsViewModes(ThemeInterface $theme) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
Return values
array<string|int, mixed>

getAllVariantsViewModes()

Get all view modes defined for all product types

public static getAllVariantsViewModes(ThemeInterface $theme) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
Tags
since
3.1.0
Return values
array<string|int, mixed>

getCategoryGroupViewModes()

Get view modes available for a Categories field and a theme

public static getCategoryGroupViewModes(Categories $field, ThemeInterface $theme) : array<string|int, mixed>
Parameters
$field : Categories
$theme : ThemeInterface
Return values
array<string|int, mixed>

getProductsViewModes()

Get view modes available for a Products field and a theme

public static getProductsViewModes(Products $field, ThemeInterface $theme) : array<string|int, mixed>
Parameters
$field : Products
$theme : ThemeInterface
Return values
array<string|int, mixed>

getProductViewModes()

Get all view modes defined for a product type uid

public static getProductViewModes(ThemeInterface $theme, ProductType $type) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
$type : ProductType
Tags
since
3.1.0
Return values
array<string|int, mixed>

getSectionsViewModes()

Get view modes available for an Entries field and a theme

public static getSectionsViewModes(Entries $field, ThemeInterface $theme) : array<string|int, mixed>
Parameters
$field : Entries
$theme : ThemeInterface
Return values
array<string|int, mixed>

getSectionViewModes()

Get all view modes defined for one section

public static getSectionViewModes(ThemeInterface $theme, Section $section) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
$section : Section
Return values
array<string|int, mixed>

getSingleEntriesViewModes()

Get all view modes defined for single sections

public static getSingleEntriesViewModes(ThemeInterface $theme) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
Return values
array<string|int, mixed>

getTagGroupViewModes()

Get view modes available for a Tag field and a theme

public static getTagGroupViewModes(Tags $field, ThemeInterface $theme) : array<string|int, mixed>
Parameters
$field : Tags
$theme : ThemeInterface
Return values
array<string|int, mixed>

getUserPhotoViewModes()

Get view modes for the user photo volume

public static getUserPhotoViewModes(ThemeInterface $theme) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
Return values
array<string|int, mixed>

getUserViewModes()

Get users view modes available for a theme

public static getUserViewModes(ThemeInterface $theme) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
Return values
array<string|int, mixed>

getVariantsViewModes()

Get view modes available for a Products field and a theme

public static getVariantsViewModes(Products $field, ThemeInterface $theme) : array<string|int, mixed>
Parameters
$field : Products
$theme : ThemeInterface
Return values
array<string|int, mixed>

getVariantViewModes()

Get variant view modes available for a product type and a theme

public static getVariantViewModes(ThemeInterface $theme, ProductType $type) : array<string|int, mixed>
Parameters
$theme : ThemeInterface
$type : ProductType
Tags
since
3.1.0
Return values
array<string|int, mixed>

getVolumesViewModes()

Get view modes available for an Assets field and a theme

public static getVolumesViewModes(Assets $field, ThemeInterface $theme) : array<string|int, mixed>
Parameters
$field : Assets
$theme : ThemeInterface
Return values
array<string|int, mixed>

getAllVolumes()

Get all defined volumes on a field

protected static getAllVolumes(Assets $field) : array<string|int, mixed>
Parameters
$field : Assets
Return values
array<string|int, mixed>

Search results