\Dewdrop\Fields\RowCollectionEditorFieldFactory

This class can create a custom field object for your RowCollectionEditor, allowing you to integrate it with a Fields object for editing, validation and viewing.

By default, this class will construct a field with editing enabled and a suitable input filter implementation for validation. The visible permission is disabled by default because you'll need to ensure that the data you're rendering with contains the information the renderer needs. When rendering in a table view, it will look for the RowCollectionEditor's ID in your row data and render that as a count (e.g. "2 Contacts"). In a detail view, it will render a table displaying all the data from the RowCollectionEditor.

Summary

Methods
Properties
Constants
__construct()
createInstance()
setTableCellMapping()
setInputFilterFactory()
getInputFilterFactory()
setEditViewHelperName()
setEditViewHelperOptions()
setTableCellViewHelperName()
setTableCellViewHelperOptions()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$editViewHelperName
$editViewHelperOptions
$tableCellViewHelperName
$tableCellViewHelperOptions
$tableCellMapping
$rowCollectionEditor
$inputFilterFactory
N/A

Properties

$editViewHelperName

$editViewHelperName : string

The view helper to use when editing the RowCollectionEditor.

Type

string

$editViewHelperOptions

$editViewHelperOptions : array

Any options to pass along to the view helper when editing.

Type

array

$tableCellViewHelperName

$tableCellViewHelperName : string

The name of the view helper you'd like to use to render table cell content.

Type

string

$tableCellViewHelperOptions

$tableCellViewHelperOptions : array

Any options you'd like to supply to the table cell view helper.

Type

array

$tableCellMapping

$tableCellMapping : string

The field we'll look for in your row data when rendering in a table view.

By default, we use the ID of the RowCollectionEditor for this.

Type

string

$rowCollectionEditor

$rowCollectionEditor : \Dewdrop\Fields\RowCollectionEditor

The RowCollectionEditor that we're generated the Field object for.

Type

\Dewdrop\Fields\RowCollectionEditor

Methods

__construct()

__construct(\Dewdrop\Fields\RowCollectionEditor  $rowCollectionEditor) 

Provide the RowCollectionEditor for which we'll be generating the field object.

Parameters

\Dewdrop\Fields\RowCollectionEditor $rowCollectionEditor

createInstance()

createInstance() : \Dewdrop\Fields\Field

Create the new field object.

Returns

\Dewdrop\Fields\Field

setTableCellMapping()

setTableCellMapping(  $tableCellMapping) : $this

Set the name of the index in row data that will be used when rendering table cell content. Defaults to the ID of the RowCollectionEditor.

Parameters

$tableCellMapping

Returns

$this

setInputFilterFactory()

setInputFilterFactory(\Dewdrop\Fields\RowCollectionEditor\InputFilterFactory  $inputFilterFactory) : $this

Set an alternate factory for the input filter, if you need to use different validation/filtering logic.

Parameters

\Dewdrop\Fields\RowCollectionEditor\InputFilterFactory $inputFilterFactory

Returns

$this

setEditViewHelperName()

setEditViewHelperName(string  $editViewHelperName) : $this

Set the name of the view helper used for editing the RowCollectionEditor's data.

Parameters

string $editViewHelperName

Returns

$this

setEditViewHelperOptions()

setEditViewHelperOptions(array  $editViewHelperOptions) : $this

Set an array of options to pass along to the view helper used to edit the RowCollectionEditor's data.

Parameters

array $editViewHelperOptions

Returns

$this

setTableCellViewHelperName()

setTableCellViewHelperName(string  $tableCellViewHelperName) : $this

Set the name of the view helper that will be used when rendering a table cell's content.

Parameters

string $tableCellViewHelperName

Returns

$this

setTableCellViewHelperOptions()

setTableCellViewHelperOptions(array  $tableCellViewHelperOptions) : $this

Set an array of options to pass along to the view helper when rendering table cell content.

Parameters

array $tableCellViewHelperOptions

Returns

$this