corcel / acf

Advanced Custom Fields (ACF) plugin for Corcel
128 stars 100 forks source link

Proposal for Flexible Content #15

Closed marcoboom closed 7 years ago

marcoboom commented 7 years ago

Based on the Repeater field I created a field for the Flexible Content type.

Please check my code in src/Field/FlexibleContent.php.

Tests are added to PHPunit. I made a new export of the test database to perform the tests.

I have also done a little change in the Field/PostObject.php.

When I created a subfield of type Post, the application returned null. I solved this by removing the query builder based on the current post by a version which uses a new static Post class.

Do you want to check this change? Because I don’t really understand why you solved this in first case.

jgrossi commented 7 years ago

Great! Can you take a look in my comments just to preserve the db connection? Awesome job! Thanks.