Skip to content
Snippets Groups Projects
Commit cae8163b authored by Harumi Jang's avatar Harumi Jang Committed by omkar podey
Browse files

phpcs

parent 209f322d
No related branches found
No related tags found
No related merge requests found
...@@ -150,8 +150,8 @@ public function form(array $form, FormStateInterface $form_state) { ...@@ -150,8 +150,8 @@ public function form(array $form, FormStateInterface $form_state) {
$field_storage = $this->entity->getFieldStorageDefinition(); $field_storage = $this->entity->getFieldStorageDefinition();
$bundles = $this->entityTypeBundleInfo->getBundleInfo($this->entity->getTargetEntityTypeId()); $bundles = $this->entityTypeBundleInfo->getBundleInfo($this->entity->getTargetEntityTypeId());
if (!isset($this->tempStoreKey)) { if (!isset($this->fieldTempStoreKey)) {
$this->tempStoreKey = $this->entity->get('field_name'); $this->fieldTempStoreKey = $this->entity->get('field_name');
} }
// @todo Change this. // @todo Change this.
...@@ -442,7 +442,7 @@ protected function actions(array $form, FormStateInterface $form_state) { ...@@ -442,7 +442,7 @@ protected function actions(array $form, FormStateInterface $form_state) {
public function validateForm(array &$form, FormStateInterface $form_state) { public function validateForm(array &$form, FormStateInterface $form_state) {
parent::validateForm($form, $form_state); parent::validateForm($form, $form_state);
$entity_type = $this->entity->getTargetEntityTypeId(); $entity_type = $this->entity->getTargetEntityTypeId();
$temp_store = $this->tempStore->get($entity_type . ':' . $this->tempStoreKey); $temp_store = $this->tempStore->get($entity_type . ':' . $this->fieldTempStoreKey);
$default_options = $temp_store['default_options']; $default_options = $temp_store['default_options'];
$this->validateAddNew($form, $form_state); $this->validateAddNew($form, $form_state);
...@@ -549,7 +549,7 @@ public function save(array $form, FormStateInterface $form_state) { ...@@ -549,7 +549,7 @@ public function save(array $form, FormStateInterface $form_state) {
if ($this->entity->isNew()) { if ($this->entity->isNew()) {
// Delete the temp store entry. // Delete the temp store entry.
$this->tempStore->delete($this->entity->getTargetEntityTypeId() . ':' . $this->tempStoreKey); $this->tempStore->delete($this->entity->getTargetEntityTypeId() . ':' . $this->fieldTempStoreKey);
} }
$this->messenger() $this->messenger()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment