2017-01-15 09:19:56 +01:00
|
|
|
<?php
|
2016-09-07 07:10:55 +02:00
|
|
|
use SilverStripe\Forms\LiteralField;
|
|
|
|
|
2015-12-17 21:20:49 +01:00
|
|
|
class SifrPage extends Page
|
|
|
|
{
|
2017-01-15 09:19:56 +01:00
|
|
|
|
2015-12-17 21:20:49 +01:00
|
|
|
public function getCMSFields()
|
|
|
|
{
|
|
|
|
$fields = parent::getCMSFields();
|
|
|
|
$fields->addFieldToTab("Root.Content.SifrSampleImage", new LiteralField("SifrSampleImage", '<p><img src="frameworktest/images/sifr_sample.png"/></p>'));
|
2017-01-15 09:19:56 +01:00
|
|
|
|
2015-12-17 21:20:49 +01:00
|
|
|
return $fields;
|
|
|
|
}
|
2010-02-18 22:15:36 +01:00
|
|
|
}
|
|
|
|
|
2017-01-15 09:19:56 +01:00
|
|
|
class SifrPage_Controller extends PageController
|
2015-12-17 21:20:49 +01:00
|
|
|
{
|
2017-01-15 09:19:56 +01:00
|
|
|
|
2015-12-17 21:20:49 +01:00
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
parent::init();
|
2017-01-15 09:19:56 +01:00
|
|
|
|
2015-12-17 21:20:49 +01:00
|
|
|
Sifr::add_font('blackout', 'themes/fonts/blackout.swf');
|
|
|
|
Sifr::replace_element('blackout', 'h2', "'.sIFR-root { text-align: left; color: red;'");
|
|
|
|
Sifr::replace_element('blackout', 'h3', "'.sIFR-root { text-align: left; color: red;'");
|
|
|
|
Sifr::replace_element('blackout', 'h4', "'.sIFR-root { text-align: left; color: red;'");
|
|
|
|
Sifr::activate_sifr();
|
|
|
|
}
|
|
|
|
}
|