Version: current

# Class FormTransformation

This class represents "transformations" of a form - such as making it printable or making it readonly. The idea is that sometimes you will want to make your own such transformations, and you shouldn't have to edit the underlying code to support this.

The first step in creating a transformation is subclassing FormTransformation. After that, you have two ways of defining specific functionality: - Define performMyTransformation() methods on each applicable FormField() object. - Define transformFieldType($field) methods on your subclass of FormTransformation.

To actually perform the transformation, call $form->transform(new MyTransformation());

  Object
  FormTransformation

### Direct known subclasses

`DisabledTransformation`, `ReadonlyTransformation`, `Translatable_Transformation`

### Indirect known subclasses

`PrintableTransformation`

Package: forms\transformations
Located at sapphire/forms/FormTransformation.php

## Methods summary

`public` | # `transform( `FormField` $field )`

### Methods inherited from Object

`__call()`, `__construct()`, `__toString()`, `__wakeup()`, `addMethodsFrom()`, `addStaticVars()`, `addWrapperMethod()`, `add_extension()`, `add_static_var()`, `allMethodNames()`, `cacheToFile()`, `cacheToFileWithArgs()`, `clearCache()`, `combined_static()`, `create()`, `createMethod()`, `create_from_string()`, `defineMethods()`, `exists()`, `extInstance()`, `extend()`, `getCustomClass()`, `getExtensionInstance()`, `getExtensionInstances()`, `get_extensions()`, `get_static()`, `hasExtension()`, `hasMethod()`, `has_extension()`, `invokeWithExtensions()`, `is_a()`, `loadCache()`, `parentClass()`, `parse_class_spec()`, `remove_extension()`, `sanitiseCachename()`, `saveCache()`, `set_stat()`, `set_static()`, `set_uninherited()`, `stat()`, `strong_create()`, `uninherited()`, `uninherited_static()`, `useCustomClass()`

### Magic methods summary

## Properties summary

### Properties inherited from Object

`$class`, `$extension_instances`, `$extensions`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -