CollectionToArrayTransformer::reverseTransform()

mixed reverseTransform($array) Transforms a value from the transformed representation to its original representation. This method is called when {@link Form::submit()} is called to transform the requests tainted data into an acceptable format for your data processing/model layer. This method must be able to deal with empty values. Usually this will be an empty string, but depending on your implementation other empty values are possible as well (such as empty strings). The reasoni

CollectionToArrayTransformer::transform()

mixed transform($collection) Transforms a value from the original representation to a transformed representation. This method is called on two occasions inside a form field: When the form field is initialized with the data attached from the datasource (object or array). When data from a request is submitted using {@link Form::submit()} to transform the new input data back into the renderable format. For example if you have a date field and submit '2009-10-10' you might accept thi

CollectionToArrayTransformer

class CollectionToArrayTransformer implements DataTransformerInterface CollectionToArrayTransformer class. Methods mixed transform($collection) Transforms a value from the original representation to a transformed representation. mixed reverseTransform($array) Transforms a value from the transformed representation to its original representation. Details mixed transform($collection) Transforms a value from the original representation to a tr

CollectionToArrayTransformer::transform()

mixed transform(Collection $collection) Transforms a collection into an array. Parameters Collection $collection A collection of entities Return Value mixed The value in the transformed representation Exceptions TransformationFailedException

Collection::offsetUnset()

offsetUnset($offset) Parameters $offset

CollectionToArrayTransformer

class CollectionToArrayTransformer implements DataTransformerInterface Methods mixed transform(Collection $collection) Transforms a collection into an array. mixed reverseTransform(mixed $array) Transforms choice keys into entities. Details mixed transform(Collection $collection) Transforms a collection into an array. Parameters Collection $collection A collection of entities Return Value mixed The value in the transformed representation E

Collection::offsetExists()

offsetExists($offset) Parameters $offset

CollectionInterface

interface CollectionInterface implements Countable, IteratorAggregate, ArrayAccess Methods Entry[] toArray() Details Entry[] toArray() Return Value Entry[]

Collection::toArray()

Entry[] toArray() Return Value Entry[]

Collection::offsetSet()

offsetSet($offset, $value) Parameters $offset $value