Skip to content

Conversation

@pepamartinec
Copy link

Export whole form type hierarchy instead of just form type name. This allows to access validated value for custom form types based on their parent.

For example, the value of the my_checkbox field is accessed same as checkbox.

class MyCheckboxType extendsBastractType {
    public function getParent() {
        return 'checkbox';
    }

    public function getName() {
        return 'my_checkbox';
    }
}


private function getFormTypeHierarchy(ResolvedFormTypeInterface $formType)
{
$type = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Change it to array(...) because it must work with PHP 5.3

Copy link
Author

Choose a reason for hiding this comment

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

Sure, fixed..

@66Ton99 66Ton99 merged commit 32ba8cc into formapro:1.3 Jun 1, 2016
@pepamartinec pepamartinec deleted the form-type-hierarchy branch June 8, 2016 08:37
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.

2 participants