This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Netwerkstatt\Helper; | |
use SilverStripe\View\TemplateGlobalProvider; | |
class DomPDFHelper implements TemplateGlobalProvider | |
{ | |
/** | |
* @return array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Netwerkstatt\NewsToBlogMigration\Extension; | |
use SilverStripe\ORM\DataExtension; | |
/** | |
* Class BlogNews | |
* @package Netwerkstatt\NewsToBlogMigration\Extension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* cleans up $Content using HTMLPurifyer | |
* | |
* @return \SilverStripe\ORM\FieldType\DBHTMLText | |
*/ | |
public function getContent() | |
{ | |
$content = $this->dbObject('Content'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class NetwerkstattDataObjectCMSPermissionExtension | |
* | |
* @property ImageGalleryAlbum|ImageGalleryItem|BookingDotComAccommodation|HomePageCategory|HomePageElement|Tag|Webcam|TomasFeatureGroup|TomasService|TomasServiceGroup|TomasServiceProvider|NetwerkstattDataObjectCMSPermissionExtension $owner | |
*/ | |
class NetwerkstattDataObjectCMSPermissionExtension extends DataExtension implements PermissionProvider | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace letters | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); | |
@if $index { | |
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | |
} | |
@return $string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MySortableAdmin extends ModelAdmin | |
{ | |
private static $managed_models = [ | |
'MySortableDataObject' | |
]; | |
private static $url_segment = "sorable-demo"; | |
private static $menu_title = "Sort stuff"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static $create_table_options = array( | |
'MySQLDatabase' => 'ENGINE=InnoDB ROW_FORMAT=COMPRESSED' | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Director::isLive()) { | |
$hostname = gethostname(); | |
$http_host = $_SERVER['HTTP_HOST']; | |
if (strpos($http_host, $hostname) !== false) { | |
//redirect to original domain | |
$destURL = str_replace('.' . $hostname, '', $http_host); | |
$response = new SS_HTTPResponse(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 6d2a7ac089e1412cf6444fcff575c8780e93a6f9 Mon Sep 17 00:00:00 2001 | |
From: Mark Guinn <mark@adaircreative.com> | |
Date: Tue, 15 Mar 2016 09:58:44 +0000 | |
Subject: [PATCH 1/3] Applied 327/migrate | |
--- | |
core/Diff.php | 21 +- | |
model/connect/DBSchemaManager.php | 4 +- | |
model/fieldtypes/Double.php | 2 +- | |
model/fieldtypes/Float.php | 2 +- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#parse("PHP File Header.php") | |
class ${NAME} extends DataObject { | |
private static \$db = array(); | |
private static \$has_one = array(); | |
private static \$has_many = array(); |
NewerOlder