You are here

protected static function ModuleBuilderComponentFormBase::setCompoundPropertyItemCount in Module Builder 7.2

Sets the item count for a compound property from the form state.

Parameters

$form_state: The form state.

array $property_address: The value address.

$item_count: The item count.

3 calls to ModuleBuilderComponentFormBase::setCompoundPropertyItemCount()
ModuleBuilderComponentFormBase::decrementCompoundPropertyItemCount in includes/module_builder.form.inc
Decrements the item count for a compound property from the form state.
ModuleBuilderComponentFormBase::elementCompound in includes/module_builder.form.inc
Set form element properties specific to compound component properties.
ModuleBuilderComponentFormBase::incrementCompoundPropertyItemCount in includes/module_builder.form.inc
Increments the item count for a compound property from the form state.

File

includes/module_builder.form.inc, line 902

Class

ModuleBuilderComponentFormBase
Backport of ComponentFormBase from 8.x-3.x version.

Code

protected static function setCompoundPropertyItemCount($form_state, $property_address, $item_count) {
  $property_address_key = implode(':', $property_address);
  $form_state
    ->set([
    'item_count',
    $property_address_key,
  ], $item_count);
}