public function Subsites()
 {
     return Subsite::all_accessible_sites();
 }
 /**
  * Similar as above, but for the LeftAndMainSubsites - allow access if user allowed into the CMS at all.
  */
 public function canAccess()
 {
     if (Subsite::all_accessible_sites()->count() > 0) {
         return true;
     }
 }
 function testAllAccessibleSites()
 {
     $member = $this->objFromFixture('Member', 'subsite1member');
     $subsites = Subsite::all_accessible_sites(true, 'Main site', $member);
     $this->assertDOSEquals(array(array('Title' => 'Subsite1 Template')), $subsites, 'Lists member-accessible sites.');
 }