SilverStripe 2.4 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
Version: master
  • master
  • 3.1
  • 3.0
  • 2.4
  • tagfield

Packages

  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • publishers
    • reports
    • security
    • tasks
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • installer
  • None
  • PHP
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets

Classes

  • DisabledTransformation
  • FormTransformation
  • PrintableTransformation
  • PrintableTransformation_TabSet
  • ReadonlyTransformation
  • TabularStyle

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
Extended by 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(), 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

Comments

Comment policy: Please use comments for tips and corrections about the described functionality. Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant.
Use the Silverstripe Forum to ask questions.
blog comments powered by Disqus
SilverStripe 2.4 API Docs API documentation generated by ApiGen 2.8.0