Webylon 3.1 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • 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
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • DisabledTransformation
  • FormTransformation
  • PrintableTransformation
  • PrintableTransformation_TabSet
  • ReadonlyTransformation
  • TabularStyle
 1 <?php
 2 /**
 3  * Transformation that will make a form printable.
 4  * Builds on readonly forms with different behaviour for tabsets.
 5  * @package forms
 6  * @subpackage transformations
 7  */
 8 class PrintableTransformation extends ReadonlyTransformation {
 9     function transformTabSet($field) {
10         $transformedField = new PrintableTransformation_TabSet($field->Tabs()->transform($this));
11         $transformedField->Title = $field->Title();
12         $transformedField->TabSet = $field->TabSet;
13         return $transformedField;
14     }
15 }
16 
17 /**
18  * Class representing printable tabsets
19  * @package forms
20  * @subpackage transformations
21  */
22 class PrintableTransformation_TabSet extends TabSet {
23     function __construct($tabs) {
24         $this->children = $tabs;
25         CompositeField::__construct($tabs);
26     }
27     
28     function FieldHolder() {
29         // This gives us support for sub-tabs.
30         $tag = ($this->tabSet) ? "h2>" : "h1>";
31         
32         foreach($this->children as $tab) {
33             $retVal .= "<$tag" . $tab->Title() . "</$tag\n";
34             $retVal .= $tab->FieldHolder();
35         }
36         return $retVal;
37         
38     }
39     
40     
41 }
42 
43 ?>
[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. -
Webylon 3.1 API Docs API documentation generated by ApiGen 2.8.0