Skip to content

getSlotNamesFor

Overview

Get all matching prefixed slots for a given type and fieldName.

Signature

getSlotNamesFor(slots, prefixType, fieldName, exclude, checkExpanded, keepEmptySuffix)

Parameters

NameTypeRequiredDescription
slotsobjectyesThe slots object
prefixTypestringyese.g., 'field', 'widget', 'header'
fieldNamestringyese.g., 'foo' or 'foo__bar'
excludestring[]yesList of slot names or suffixes to exclude.
checkExpandedbooleannoIf true, expanded slots are also checked.
keepEmptySuffixbooleannoIf true, empty suffixes are kept in the result.

Returns

[string, string][]

  • [outerName, innerName] slot pairs

Source

client/lib/utils/rendererSupport.js:35

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2