code/model/VirtualPage.php 1 location
|
@@ 359-368 (lines=10) @@
|
| 356 |
|
|
| 357 |
|
// "Can be root" validation |
| 358 |
|
$orig = $this->CopyContentFrom(); |
| 359 |
|
if(!$orig->stat('can_be_root') && !$this->ParentID) { |
| 360 |
|
$result->error( |
| 361 |
|
_t( |
| 362 |
|
'VirtualPage.PageTypNotAllowedOnRoot', |
| 363 |
|
'Original page type "{type}" is not allowed on the root level for this virtual page', |
| 364 |
|
array('type' => $orig->i18n_singular_name()) |
| 365 |
|
), |
| 366 |
|
'CAN_BE_ROOT_VIRTUAL' |
| 367 |
|
); |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
return $result; |
| 371 |
|
} |
code/model/SiteTree.php 1 location
|
@@ 1608-1617 (lines=10) @@
|
| 1605 |
|
} |
| 1606 |
|
|
| 1607 |
|
// "Can be root" validation |
| 1608 |
|
if(!$this->stat('can_be_root') && !$this->ParentID) { |
| 1609 |
|
$result->error( |
| 1610 |
|
_t( |
| 1611 |
|
'SiteTree.PageTypNotAllowedOnRoot', |
| 1612 |
|
'Page type "{type}" is not allowed on the root level', |
| 1613 |
|
array('type' => $this->i18n_singular_name()) |
| 1614 |
|
), |
| 1615 |
|
'CAN_BE_ROOT' |
| 1616 |
|
); |
| 1617 |
|
} |
| 1618 |
|
|
| 1619 |
|
return $result; |
| 1620 |
|
} |