mediatekformation

PropertyAccessDecorator
in package
implements ChoiceListFactoryInterface

Adds property path support to a choice list factory.

Pass the decorated factory to the constructor:

$decorator = new PropertyAccessDecorator($factory);

You can now pass property paths for generating choice values, labels, view indices, HTML attributes and for determining the preferred choices and the choice groups:

// extract values from the $value property
$list = $createListFromChoices($objects, 'value');
Tags
author

Bernhard Schussek bschussek@gmail.com

Interfaces, Classes, Traits and Enums

ChoiceListFactoryInterface
Creates {@link ChoiceListInterface} instances.

Table of Contents

$decoratedFactory  : mixed
$propertyAccessor  : mixed
__construct()  : mixed
createListFromChoices()  : ChoiceListInterface
Creates a choice list for the given choices.
createListFromLoader()  : ChoiceListInterface
Creates a choice list that is loaded with the given loader.
createView()  : ChoiceListView
Creates a view for the given choice list.
getDecoratedFactory()  : ChoiceListFactoryInterface
Returns the decorated factory.

Properties

Methods

createView()

Creates a view for the given choice list.

public createView(ChoiceListInterface $list[, mixed $preferredChoices = null ][, mixed $label = null ][, mixed $index = null ][, mixed $groupBy = null ][, mixed $attr = null ]) : ChoiceListView
Parameters
$list : ChoiceListInterface
$preferredChoices : mixed = null
$label : mixed = null
$index : mixed = null
$groupBy : mixed = null
$attr : mixed = null
Return values
ChoiceListView

Search results