PluginCollectionItemList.php in Plugin 8.2
File
src/Plugin/Field/FieldType/PluginCollectionItemList.php
View source
<?php
namespace Drupal\plugin\Plugin\Field\FieldType;
use Drupal\Core\Field\FieldItemList;
use Drupal\Core\Form\FormStateInterface;
class PluginCollectionItemList extends FieldItemList {
public function defaultValuesFormSubmit(array $element, array &$form, FormStateInterface $form_state) {
$values = parent::defaultValuesFormSubmit($element, $form, $form_state);
foreach ($values as $delta => $value) {
unset($values[$delta]['plugin_instance']);
}
return $values;
}
}