ElggSite::delete PHP Method

delete() public method

Delete the site.
public delete ( ) : boolean
return boolean
    public function delete()
    {
        global $CONFIG;
        if ($CONFIG->site->getGUID() == $this->guid) {
            throw new \SecurityException('You cannot delete the current site');
        }
        return parent::delete();
    }

Usage Example

コード例 #1
0
ファイル: ElggSiteTest.php プロジェクト: elgg/elgg
 public function testElggSiteSaveAndDelete()
 {
     $guid = $this->site->save();
     $this->assertIsA($guid, 'int');
     $this->assertTrue($guid > 0);
     $this->assertIdentical(true, $this->site->delete());
 }
All Usage Examples Of ElggSite::delete