Feature #42539

Allow Object.yaml property value to be also an array

Added by Adrian Föder almost 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-10-31
Priority:Should have Due date:
Assigned To:Adrian Föder % Done:

100%

Category:Object
Target version:TYPO3 Flow Base Distribution - 2.0
PHP Version: Complexity:easy
Has patch:Yes

Description

It would be nice to be allowed setting also arrays as values for Object properties.

Use case: consider the following "foreign" repository:

 1/**
 2 * A repository for Comments
 3 *
 4 * @Flow\Scope("singleton")
 5 */
 6class CommentRepository extends \TYPO3\Flow\Persistence\Repository {
 7
 8    /**
 9     * @var array
10     */
11    protected $defaultOrderings = array('creationDate' => \TYPO3\Flow\Persistence\QueryInterface::ORDER_DESCENDING); 

I'd like to modify this from my application, using Objects.yaml:

1TYPO3\Comments\Domain\Repository\CommentRepository:
2  properties:
3    defaultOrderings:
4      value:
5        creationDate: 'ASC'

This currently doesn't work because the handling (in DependencyInjection\ProxyClassBuilder) does only expect plain values.


Related issues

related to TYPO3.Comments - Support #34765: Set the default orderings from outside Closed 2012-03-12

Associated revisions

Revision fd2178cf
Added by Adrian Föder over 2 years ago

[FEATURE] Allow arrays to be set via Object.yaml property values

This introduces the option to also set arrays as plain native values
in Objects.yaml. This allows settings like the following::

Acme\Foobar\Domain\Repository\BazRepository:
properties:
defaultOrderings:
value:
creationDate: 'ASC'

Change-Id: I2efc94ef6c95115ee61a2ee4b35d7614f54cfe46
Resolves: #42539
Releases: 1.2

History

#1 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16068

#2 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16068

#3 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16068

#4 Updated by Adrian Föder over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF