getParsedBody(); $class = $this->getClass($parsedBody['id']); $index = ($parsedBody['index'] ?? count($class->getProperties(false))) + 1; $options = [ 'index' => $index, 'disableIndexChanges' => $this->isAdvancedSearchEnabled(), FormContainer::IS_DISABLED => !$hasWriteAccess, ]; $newProperty = $class->createProperty('Property_' . $index); $propFormContainer = new SimpleProperty($class, $newProperty, $options); return $propFormContainer->getForm(); } private function isAdvancedSearchEnabled(): bool { /** @var AdvancedSearchChecker $advancedSearchChecker */ $advancedSearchChecker = $this->getServiceLocator()->get(AdvancedSearchChecker::class); return $advancedSearchChecker->isEnabled(); } }