2013-08-22 03:02:46 +02:00
|
|
|
<?php
|
|
|
|
|
2017-05-24 12:32:05 +02:00
|
|
|
namespace SilverStripe\Subsites\Extensions;
|
|
|
|
|
|
|
|
|
2016-09-22 16:38:29 +02:00
|
|
|
use SilverStripe\Core\Extension;
|
|
|
|
|
2017-05-24 12:32:05 +02:00
|
|
|
|
2013-08-22 03:02:46 +02:00
|
|
|
/*
|
|
|
|
* Simple extension to show admins in the menu of subsites.
|
2017-05-24 15:26:28 +02:00
|
|
|
* If an admin area should be available to a subsite, you can attach
|
2013-08-22 03:02:46 +02:00
|
|
|
* this class to your admin in config. eg:
|
|
|
|
*
|
|
|
|
* MyAdmin::add_extension('SubsiteMenuExtension');
|
|
|
|
*
|
|
|
|
* Or you can include the subsiteCMSShowInMenu function in your admin class and have it return true
|
|
|
|
*/
|
|
|
|
|
2017-05-24 15:26:28 +02:00
|
|
|
class SubsiteMenuExtension extends Extension
|
|
|
|
{
|
|
|
|
|
|
|
|
public function subsiteCMSShowInMenu()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2013-08-22 03:02:46 +02:00
|
|
|
|
|
|
|
}
|