Skip to content

Conversation

@christianbader
Copy link

No description provided.

@christianbader christianbader changed the title [WIP] Added context to ChoiceOptionProvider for dynamic choices [WIP] Added context to ChoicesProvider for enabling dynamic choices Mar 21, 2024
@limenet limenet self-requested a review March 21, 2024 11:12
}

public function build(string $name): FormBuilderInterface
public function build(string $name, mixed $context = null): FormBuilderInterface
Copy link
Author

@christianbader christianbader Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extend the following functions with context:

 /**
 * @return array<mixed>
 */
public function buildJson(string $name): array
{
    return $this->json($this->buildForm($name));
}

public function buildJsonString(string $name): string
{
    return json_encode($this->buildJson($name), \JSON_THROW_ON_ERROR);
}

public function buildForm(string $name): FormInterface
{
    return $this->build($name)->getForm();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant