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
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
xmlns:gx="http://www.google.com/kml/ext/2.2" | |
xmlns:atom="http://www.w3.org/2005/Atom" | |
xmlns="http://www.opengis.net/kml/2.2"> | |
<Document> | |
<name>LandUse</name> | |
<visibility>1</visibility> | |
<Schema name="LandUse" id="kml_schema_ft_LandUse"> |
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 | |
// Logging to file (create notices.log with necessary permissions for apache to write to) | |
$handler = new Monolog\Handler\StreamHandler('/var/www/html/assets/notices.log'); | |
$handler->setFormatter(new Monolog\Formatter\LineFormatter(null, null, true, true)); | |
Injector::inst()->get('Logger')->pushHandler($handler); | |
// Logging to Chrome console (composer require --dev ccampbell/chromephp 4.1.0) | |
$handler = new Monolog\Handler\ChromePHPHandler(); | |
$handler->setFormatter(new Monolog\Formatter\ChromePHPFormatter()); |
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 EmailPage extends Page { | |
} | |
class EmailPage_Controller extends Page_Controller { | |
private static $allowed_actions = array( | |
'Form' | |
); |
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 | |
/** | |
* Files that are uploaded only to be attached to emails and are not saved into assets. | |
*/ | |
class EditableFileAttachmentField extends EditableFormField { | |
private static $singular_name = 'File Attachment Field'; | |
private static $plural_names = 'File Attachment Fields'; |
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 ResetDatabaseTask extends BuildTask { | |
protected $title = "Reset database"; | |
protected $description = "Reset the database to a blank canvas"; | |
static $fixture_file = 'builder/tasks/Reset.yml'; | |
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 GridFieldDetailForm_ItemRequest extends RequestHandler { | |
//... | |
public function doDelete($data, $form) { | |
try { | |
$toDelete = $this->record; |
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 GridFieldConfig_HasManyRelationEditor extends GridFieldConfig { | |
/** | |
* | |
* @param int $itemsPerPage - How many items per page should show up | |
*/ | |
public function __construct($itemsPerPage=null) { | |
$this->addComponent(new GridFieldButtonRow('before')); | |
$this->addComponent(new GridFieldAddNewButton('buttons-before-left')); |
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 | |
$result = new ValidationResult(); | |
$result->error( | |
'Some message', | |
'VariationsDisabledError' | |
); | |
return $result; |
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 | |
/* | |
* Payment | |
* ==================================================== | |
*/ | |
//Order notifications sent to | |
Email::setAdminEmail('test@example.com'); |
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 OrderPage extends Page { | |
} | |
/** | |
* Represents a page with a form which a user fills out to process payment | |
*/ | |
class OrderPage_Controller extends Page_Controller { |
NewerOlder