Skip to content

Drupal Display Mode-powered Entity, Form and Field Druxt components.

DruxtEntityMixin

View source on GitHub

DruxtEntityMixin

Provides Vue.js properties to render a DruxtEntity or DruxtEntityForm Wrapper component.

Kind: global mixin
See: /modules/entity
Example

<script>
import { DruxtEntityMixin } from 'druxt-entity'

export default {
  mixins: [DruxtEntityMixin],
}
</script>

.props

Kind: static property of DruxtEntityMixin


.entity : object

The Drupal Entity JSON:API resource data.

Kind: static property of props


.fields : object

Drupal Entity Fields data.

Kind: static property of props


.langcode : string

The JSON:API resource language code.

Kind: static property of props


.schema : object

DruxtJS Schema object.

Kind: static property of props


.value : object

The Entity value.

Kind: static property of props


.computed

Kind: static property of DruxtEntityMixin


.classes() : Array.<string>

Array of CSS classes.

Kind: static method of computed


.data(vm)

Provides the reactive entity model, initialized from the value property.

Kind: static method of DruxtEntityMixin

ParamTypeDescription
vmobjectThe component ViewModel.
vm.valueobjectThe Entity value.

Properties

NameTypeDescription
modelobjectThe model object.