Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
Resources Class Reference
Inheritance diagram for Resources:
RouteMap

Public Member Functions

 getResource ($resource_id)
 
 editResource ($resource_id)
 
 deleteResource ($resource_id)
 
 getResourceChildren ($resource_id)
 
 getResourceParent ($resource_id)
 
 getResourceProperties ($resource_id)
 
 getResourceBookingPlan ($resource_id)
 
 getResourceSemesterBookingPlan ($resource_id)
 
 getResourceRequests ($resource_id)
 
 getResourceBookings ($resource_id)
 
 createResourceBooking ($resource_id)
 
 createSimpleResourceRequest ($resource_id)
 
 toggleResourceBookingIntervalTakesPlaceField ($interval_id)
 
- Public Member Functions inherited from RouteMap
 __construct ()
 
 init ($router, $route)
 
 paginated ($data, $total, $uri_params=[], $query_params=[])
 
 paginate ($uri_format, $total, $offset=null, $limit=null)
 
 collect ($data)
 
 status ($status)
 
 headers ($headers=[])
 
 body ($body)
 
 contentType ($mime_type, $params=[])
 
 error ($status, $body=null)
 
 etag ($value, $strong_etag=true, $new_resource=null)
 
 expires ($amount, $cache_control=[])
 
 cacheControl ($values)
 
 halt ()
 
 lastModified ($time)
 
 notFound ($body=null)
 
 redirect ($url, $args=null)
 
 sendFile ($_path, $opts=[])
 
 url ($addr, $url_params=null)
 
 urlf ($addr_f, $format_params, $url_params=null)
 
 getRoutes ($http_method=null)
 
 getResponse ()
 

Additional Inherited Members

- Protected Member Functions inherited from RouteMap
 extractConditions ($docblock, $conditions=[])
 
- Protected Attributes inherited from RouteMap
 $router
 
 $route
 
 $data = null
 
 $response
 
 $pagination = false
 
 $offset
 
 $limit
 

Detailed Description

This file contains the REST class for the room and resource management system.

Author
Moritz Strohm stroh.nosp@m.m@da.nosp@m.ta-qu.nosp@m.est..nosp@m.de
Since
4.5

Member Function Documentation

createResourceBooking (   $resource_id)

Creates a booking/reservation/lock for a resource.

Parameters
begin,:The begin timestamp for the booking.
end,:The end timestamp for the booking.
preparation_time,:The amount of seconds for preparation time before the begin timestamp.
internal_comment,:A comment that is only visible for some parts of the staff.
booking_type,:The booking type: 0 = normal booking 1 = reservation 2 = lock
Postcondition
/resources/resource/:resource_id/assign
createSimpleResourceRequest (   $resource_id)

Creates a resource request.

Postcondition
/resources/resource/:resource_id/request_simple
deleteResource (   $resource_id)

Deletes a resource object.

/resources/resource/:resource_id

editResource (   $resource_id)

Modifies a resource object.

/resources/resource/:resource_id

getResource (   $resource_id)

Get a resource object.

Parameters
derived_class,:If the URL parameter derived_class is set the resource object is converted to an instance of the class that does correct handling of the resource object.

/resources/resource/:resource_id

getResourceBookingPlan (   $resource_id)

Returns the booking plan of a resource for a week specified by the parameters begin and end.

Parameters
begin,:The begin timestamp of the time range for the booking plan.
end,:The end timestamp of the time range for the booking plan.

/resources/resource/:resource_id/booking_plan

getResourceBookings (   $resource_id)
Parameters
begin,:A timestamp specifying the begin of the time range.
end,:A timestamp specifying the end of the time range.
user_id,:This parameter limits the result set to bookings of the user specified by the user-ID provided in this parameter.
types,:Limits the result to booking types specified in this parameter. The allowed types are comma separated like this: "1,2,3". The defined types are: 0 = normal booking, 1 = reservation, 2 = lock.

/resources/resource/:resource_id/bookings

getResourceChildren (   $resource_id)

Returns the child resources of a resource object, if they exist.

/resources/resource/:resource_id/children

getResourceParent (   $resource_id)

Returns the parent resource of a resource object, if it exists.

/resources/resource/:resource_id/parent

getResourceProperties (   $resource_id)

Get all property objects of a resource.

/resources/resource/:resource_id/properties

getResourceRequests (   $resource_id)

Gets request of a resource. At your option the requests can be limited to a specific time range, specified by the parameters begin and end. Furthermore the requests can be filtered by user-ID.

Parameters
begin,:A timestamp specifying the begin of the time range.
end,:A timestamp specifying the end of the time range.
user_id,:This parameter limits the result set to requests of the user specified by the user-ID provided in this parameter.

/resources/resource/:resource_id/requests

getResourceSemesterBookingPlan (   $resource_id)

Returns the booking plan of a resource for a selected semester.

Parameters
semester_id,:The ID of the semester. Defaults to the current semester, if not set.

/resources/resource/:resource_id/semester_plan

toggleResourceBookingIntervalTakesPlaceField (   $interval_id)

Change the status of a resource booking interval:

Postcondition
/resources/booking_interval/:interval_id/toggle_takes_place

The documentation for this class was generated from the following file: