2016-08-19 00:51:35 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\Forms;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Transformation that will make a form printable.
|
|
|
|
* Builds on readonly forms with different behaviour for tabsets.
|
|
|
|
*/
|
2016-11-29 00:31:16 +01:00
|
|
|
class PrintableTransformation extends ReadonlyTransformation
|
|
|
|
{
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2016-11-29 00:31:16 +01:00
|
|
|
/**
|
|
|
|
* @param TabSet $field
|
|
|
|
* @return PrintableTransformation_TabSet
|
|
|
|
*/
|
|
|
|
public function transformTabSet($field)
|
|
|
|
{
|
|
|
|
$transformedField = new PrintableTransformation_TabSet($field->Tabs()->transform($this));
|
|
|
|
$transformedField->Title = $field->Title();
|
|
|
|
$transformedField->TabSet = $field->TabSet;
|
|
|
|
return $transformedField;
|
|
|
|
}
|
2016-08-19 00:51:35 +02:00
|
|
|
}
|