public function __construct()
 {
     $guid = pageArray(2);
     $entity = getEntity($guid);
     classGateKeeper($entity, "Videoalbum");
     if (loggedInUserCanDelete($entity)) {
         $entity->delete();
     }
     new SystemMessage('Your video album and all videos it contained have been deleted.');
     forward("videos");
 }
 public function __construct()
 {
     $guid = pageArray(2);
     $video = getEntity($guid);
     classGateKeeper($video, "Video");
     $album_guid = $video->container_guid;
     if (loggedInUserCanDelete($video)) {
         $video->delete();
         new SystemMessage("Your video has been deleted.");
     }
     forward("videos/albums/view/{$album_guid}");
 }
 function __construct($data = NULL)
 {
     $guid = $data['guid'];
     if (!$guid) {
         $guid = pageArray(2);
     }
     $comment = getEntity($guid);
     classGateKeeper($comment, "Comment");
     if (loggedInUserCanDelete($comment)) {
         $comment->delete();
     }
     forward();
 }
 function __construct()
 {
     $guid = pageArray(2);
     $group = getEntity($guid);
     if (loggedInUserCanDelete($group)) {
         $group->delete();
     }
     $memberships = getEntities(array("type" => "Groupmembership", "metadata_name" => "container_guid", "metadata_value" => $guid));
     foreach ($memberships as $membership) {
         $membership->delete();
     }
     new SystemMessage("Your group has been deleted.");
     forward("groups");
 }
 function __construct()
 {
     $guid = pageArray(2);
     $topic = getEntity($guid);
     classGateKeeper($topic, "Forumtopic");
     if (loggedInUserCanDelete($topic)) {
         $topic->delete();
         $comments = getEntities(array("type" => "Comment", "metadata_name" => "container_guid", "metadata_value" => $guid));
         foreach ($comments as $comment) {
             $comment->delete();
         }
         new SystemMessage("Your topic has been deleted.");
         forward();
     }
 }
 function __construct()
 {
     $guid = pageArray(2);
     $profile_status = getEntity($guid);
     if (loggedInUserCanDelete($profile_status)) {
         $profile_status->delete();
         $comments = getEntities(array("type" => "Comment", "metadata_name" => "container_guid", "metadata_value" => $guid));
         if ($comments) {
             foreach ($comments as $comment) {
                 $comment->delete();
             }
         }
         new SystemMessage("Your status post has been deleted.");
     }
     forward();
 }