Inherit Wrapper

<sw-inherit-wrapper>

ready
Wrapper for inherited data with toggle

Usage

Loading...
<sw-inherit-wrapper
    v-model="entity.value"
    :inheritedValue="inheritedEntity.value"
    :customInheritationCheckFunction="function(value) => {return true;}"
    :customRestoreFunction="function(value) => {return null;}"
    :customRemoveInheritanceFunction="function(value) => {return null;}"
    :disabled="false"
    label="Your label"
    :isAssociation="false"
    :hasParent="false"
    :required="true">

    <template #content="{
         currentValue,
         updateCurrentValue,
         isInherited,
         isInheritField,
         toggleInheritance,
         restoreInheritance,
         removeInheritance
     }"><!-- Your Content --></template>

</sw-inherit-wrapper>

Component properties

Property name Type Default
value
inheritedValue
disabled false
label String
required Boolean false
isAssociation Boolean false
hasParent Boolean false
customInheritationCheckFunction Function
customRestoreInheritanceFunction Function
customRemoveInheritanceFunction Function

Methods

Method name Parameters
updateCurrentValue value
updateValue value inheritanceEventName
toggleInheritance No parameters
restoreInheritance No parameters
removeInheritance newValue

Imports

  • ./sw-inherit-wrapper.scss
  • ./sw-inherit-wrapper.html.twig

Twig blocks

  • sw_inherit_wrapper_toggle_wrapper_field
  • sw_inherit_wrapper_toggle_wrapper_label
  • sw_inherit_wrapper_toggle_wrapper
  • sw_inherit_wrapper_toggle
  • sw_inherit_wrapper_content
  • sw_inherit_wrapper

Slots

  • content