@@ 760-766 (lines=7) @@ | ||
757 | $this->cache->saveConfigurable(true, $className, null, true); |
|
758 | // if needed, update the list of entities in a local cache |
|
759 | $entities = $this->cache->getEntities(true); |
|
760 | if (null !== $entities && !isset($entities[$className])) { |
|
761 | $entities[$className] = [ |
|
762 | 'i' => null, |
|
763 | 'h' => $mode === ConfigModel::MODE_HIDDEN |
|
764 | ]; |
|
765 | $this->cache->saveEntities($entities, true); |
|
766 | } |
|
767 | ||
768 | // @todo: Should be removed together with deprecated events |
|
769 | if ($this->hasListeners(Events::NEW_ENTITY_CONFIG)) { |
|
@@ 823-830 (lines=8) @@ | ||
820 | $this->cache->saveConfigurable(true, $className, $fieldName, true); |
|
821 | // if needed, update the list of fields in a local cache |
|
822 | $fields = $this->cache->getFields($className, true); |
|
823 | if (null !== $fields && !isset($fields[$fieldName])) { |
|
824 | $fields[$fieldName] = [ |
|
825 | 'i' => null, |
|
826 | 'h' => $mode === ConfigModel::MODE_HIDDEN, |
|
827 | 't' => $fieldType, |
|
828 | ]; |
|
829 | $this->cache->saveFields($className, $fields, true); |
|
830 | } |
|
831 | ||
832 | // @todo: Should be removed together with deprecated events |
|
833 | if ($this->hasListeners(Events::NEW_FIELD_CONFIG)) { |