mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
20 lines
348 B
PHP
20 lines
348 B
PHP
<?php
|
|
|
|
class SubsiteDomain extends DataObject {
|
|
static $db = array(
|
|
"Domain" => "Varchar(255)",
|
|
"IsPrimary" => "Boolean",
|
|
);
|
|
static $has_one = array(
|
|
"Subsite" => "Subsite",
|
|
);
|
|
|
|
/**
|
|
* Whenever a Subsite Domain is written, rewrite the hostmap
|
|
*
|
|
* @return void
|
|
*/
|
|
public function onAfterWrite() {
|
|
Subsite::writeHostMap();
|
|
}
|
|
} |