API Documentation
DruxtViewsSorts
Modules
- DruxtViewsSorts
Used by the DruxtView component to render a Druxt Wrapper themeable sort.
Typedefs
- ComponentOptions :
Array.<array> Provides the available component naming options for the Druxt Wrapper.
- PropsData :
object Provides propsData for the DruxtWrapper.
- ScopedSlots :
object Provides scoped slots for use in the Wrapper component.
DruxtViewsSorts
Used by the DruxtView component to render a Druxt Wrapper themeable sort.
Example
<DruxtViewsSorts
:options="{}"
:sorts="[{}]"
type="basic"
/>
- DruxtViewsSorts
- instance
- .sortBy(sort) ⇒
object
- .sortBy(sort) ⇒
- static
- instance
.sortBy(sort) ⇒ object
Returns a merged Route object with the provided sort.
Kind: instance method of DruxtViewsSorts
| Param | Type | Description |
|---|---|---|
| sort | string | The sort ID. |
.props
Kind: static property of DruxtViewsSorts
.options : object
The Exposed form options.
Kind: static property of props
.sorts : Array.<object>
The Exposed Sort objects.
Kind: static property of props
.type : string
The Exposed form type.
Kind: static property of props
.langcode
The resource langcode.
Kind: static property of props
Example
<DruxtViewsSorts langcode="en" />
.v-model
The module component model value.
Used to bypass the Drupal JSON:API fetch, setting the module data directly.
Kind: static property of props
Example
<DruxtViewsSorts v-model="{ foo: bar }" />
.wrapper
The wrapper component configuration.
Used to set the wrapper component, class, style and propsData.
Kind: static property of props
Example
<DruxtViewsSorts
:wrapper="{
component: 'MyWrapper',
class: 'wrapper',
propsData: { foo: 'bar' }
}"
/>
.druxt
DruxtModule settings
Kind: static property of DruxtViewsSorts
.template
Druxt development template tool configuration.
Kind: static property of druxt
.componentOptions(context) ⇒ ComponentOptions
Provides the available component naming options for the DruxtWrapper.
Kind: static method of druxt
| Param | Type | Description |
|---|---|---|
| context | object | The module component ViewModel. |
.propsData(context) ⇒ PropsData
Provides propsData for the DruxtWrapper.
Kind: static method of druxt
| Param | Type | Description |
|---|---|---|
| context | object | The module component ViewModel. |
.slots() ⇒ ScopedSlots
Provides the scoped slots object for the Module render function.
The default slot will render a list of sorts.
Kind: static method of druxt
Returns: ScopedSlots - The Scoped slots object.
ComponentOptions : Array.<array>
Provides the available component naming options for the Druxt Wrapper.
Kind: global typedef
Example
[
'DruxtViewsSorts[Type][Langcode]',
'DruxtViewsSorts[Type]',
'DruxtViewsSorts[Default][Langcode]',
'DruxtViewsSorts[Default]'
]
Example
[
'DruxtViewsSortsBasicEn',
'DruxtViewsSortsBasic',
'DruxtViewsSortsDefaultEn',
'DruxtViewsSortsDefault'
]
PropsData : object
Provides propsData for the DruxtWrapper.
Kind: global typedef
| Param | Type | Description |
|---|---|---|
| options | object | The Exposed form options. |
| sorts | Array.<object> | The Exposed Sort objects. |
| type | string | The Exposed form type. |
| value | integer | The DruxtViewSorts model value. |
Example
{
options: {
expose_sort_order: true,
expose_sorts_label: 'Sort by',
reset_button: false,
...
},
sorts: [{
admin_label: '',
expose: {},
exposed: true,
...
}],
type: 'basic',
value: undefined,
}
ScopedSlots : object
Provides scoped slots for use in the Wrapper component.
Kind: global typedef
| Param | Type | Description |
|---|---|---|
| default | function | A list of sort links. |