Ejemplo n.º 1
0
 public function getCurrentObject(UrlRequestObject $urlRequestObject)
 {
     $params = $urlRequestObject->getParams();
     $id = $params[0];
     if (isset($id)) {
         if (!isset($GLOBALS["STEAM"])) {
             return null;
         }
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $id);
         if (!$object instanceof steam_object) {
             return null;
         }
         $type = getObjectType($object);
         if (array_search($type, array("gallery")) !== false) {
             return $object;
         }
     }
     return null;
 }
Ejemplo n.º 2
0
 public function getCurrentObject(UrlRequestObject $urlRequestObject)
 {
     $params = $urlRequestObject->getParams();
     $id = $params[0];
     if (isset($id)) {
         if (!isset($GLOBALS["STEAM"])) {
             return null;
         }
         $object = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $id);
         if (!$object instanceof steam_object) {
             return null;
         }
         $type = getObjectType($object);
         if (array_search($type, array("referenceFolder", "container", "userHome", "groupWorkroom", "room", "document")) !== false) {
             return $object;
         }
     } else {
         $currentUser = $GLOBALS["STEAM"]->get_current_steam_user();
         $object = $currentUser->get_workroom();
         return $object;
     }
     return null;
 }