Questions tagged «typo3-flow»

2
FLOW3动作参数和对象数组
FLOW3提供了一种方便的方法,可以通过URL中的ID传递实体,并在controller动作的参数中自动实例化它们: class PostController extends \TYPO3\FLOW3\MVC\Controller\ActionController { public function editAction(Post $post) { ... } } 但是,如果您有一个复选框,每个复选框代表一个特定的对象,该用例如何?也可以自动实例化它们: <input type="checkbox" name="tags[]" value="1" /> <input type="checkbox" name="tags[]" value="2" /> ... 有没有办法告诉FLOW3将实例自动实例$tags化为Tag对象数组?就像是: public function setTagsAction(Post $post, /** @var Model\Tag */ array $tags) { $post->setTags($tags); }
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.