API Documentation
DruxtViewsPager
Modules
- DruxtViewsPager
Used by the DruxtView component to render a Druxt Wrapper themeable pager.
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.
DruxtViewsPager
Used by the DruxtView component to render a Druxt Wrapper themeable pager.
- DruxtViewsPager
- instance
- .getQuery(link) ⇒
object
- .getRoute(link) ⇒
object
- .setPage(link)
- .getQuery(link) ⇒
- static
- instance
object
.getQuery(link) ⇒ Get the query object from provided link.
Kind: instance method of DruxtViewsPager
Param | Type | Description |
---|---|---|
link | string | A url with querystring. |
object
.getRoute(link) ⇒ Get a Route object from provided link.
Kind: instance method of DruxtViewsPager
Param | Type | Description |
---|---|---|
link | string | A url with querystring. |
.setPage(link)
Set the model from provided link.
Kind: instance method of DruxtViewsPager
Param | Type | Description |
---|---|---|
link | string | A url with querystring. |
.props
Kind: static property of DruxtViewsPager
integer
.count : The JSON:API Views results total count.
Kind: static property of props
object
.options : The Pager options.
Kind: static property of props
object
.resource : The JSON:API Views results resource.
Kind: static property of props
string
.type : The Pager type.
Kind: static property of props
integer
.value : The DruxtViewPager model value.
Kind: static property of props
.langcode
The resource langcode.
Kind: static property of props
Example
<DruxtViewsPager 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
<DruxtViewsPager 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
<DruxtViewsPager
:wrapper="{
component: 'MyWrapper',
class: 'wrapper',
propsData: { foo: 'bar' }
}"
/>
.methods
Kind: static property of DruxtViewsPager
.druxt
DruxtModule settings
Kind: static property of DruxtViewsPager
.template
Druxt development template tool configuration.
Kind: static property of druxt
ComponentOptions
.componentOptions(context) ⇒ Provides the available component naming options for the DruxtWrapper.
Kind: static method of druxt
Param | Type | Description |
---|---|---|
context | object | The module component ViewModel. |
PropsData
.propsData(context) ⇒ Provides propsData for the DruxtWrapper.
Kind: static method of druxt
Param | Type | Description |
---|---|---|
context | object | The module component ViewModel. |
ScopedSlots
.slots() ⇒ Provides the scoped slots object for the Module render function.
The default
slot will render basic pagination based on the JSON:API links.
Kind: static method of druxt
Returns: ScopedSlots
- The Scoped slots object.
Array.<array>
ComponentOptions : Provides the available component naming options for the Druxt Wrapper.
Kind: global typedef
Example
[
'DruxtViewsPager[Type][Langcode]',
'DruxtViewsPager[Type]',
'DruxtViewsPager[Default][Langcode]',
'DruxtViewsPager[Default]'
]
Example
[
'DruxtViewsPagerFullEn',
'DruxtViewsPagerFull',
'DruxtViewsPagerDefaultEn',
'DruxtViewsPagerDefault'
]
object
PropsData : Provides propsData for the DruxtWrapper.
Kind: global typedef
Param | Type | Description |
---|---|---|
count | integer | The JSON:API Views results total count. |
options | object | The Pager options. |
resource | object | The JSON:API Views results resource. |
type | string | The Pager type. |
value | integer | The DruxtViewPager model value. |
Example
{
count: 20,
options: {
expose: {},
id: 0,
items_per_page: 10,
...
},
resource: {
data: [],
jsonapi: {},
links: {},
meta: {},
},
type: 'full',
value: 0,
}
object
ScopedSlots : Provides scoped slots for use in the Wrapper component.
Kind: global typedef
Param | Type | Description |
---|---|---|
default | function | A JSON:API resource links based pager. |