Stud.IP  5.4
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()

createResourceBooking (   $resource_id)

Creates a booking/reservation/lock for a resource.

Parameters
beginThe begin timestamp for the booking.
endThe end timestamp for the booking.
preparation_timeThe amount of seconds for preparation time before the begin timestamp.
internal_commentA comment that is only visible for some parts of the staff.
booking_typeThe booking type: 0 = normal booking 1 = reservation 2 = lock
Postcondition
/resources/resource/:resource_id/assign

◆ createSimpleResourceRequest()

createSimpleResourceRequest (   $resource_id)

Creates a resource request.

Postcondition
/resources/resource/:resource_id/request_simple

◆ deleteResource()

deleteResource (   $resource_id)

Deletes a resource object.

/resources/resource/:resource_id

◆ editResource()

editResource (   $resource_id)

Modifies a resource object.

/resources/resource/:resource_id

◆ getResource()

getResource (   $resource_id)

Get a resource object.

Parameters
derived_classIf 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()

getResourceBookingPlan (   $resource_id)

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

Parameters
beginThe begin timestamp of the time range for the booking plan.
endThe end timestamp of the time range for the booking plan.

/resources/resource/:resource_id/booking_plan

◆ getResourceBookings()

getResourceBookings (   $resource_id)
Parameters
beginA timestamp specifying the begin of the time range.
endA timestamp specifying the end of the time range.
user_idThis parameter limits the result set to bookings of the user specified by the user-ID provided in this parameter.
typesLimits 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()

getResourceChildren (   $resource_id)

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

/resources/resource/:resource_id/children

◆ getResourceParent()

getResourceParent (   $resource_id)

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

/resources/resource/:resource_id/parent

◆ getResourceProperties()

getResourceProperties (   $resource_id)

Get all property objects of a resource.

/resources/resource/:resource_id/properties

◆ getResourceRequests()

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
beginA timestamp specifying the begin of the time range.
endA timestamp specifying the end of the time range.
user_idThis 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()

getResourceSemesterBookingPlan (   $resource_id)

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

Parameters
semester_idThe ID of the semester. Defaults to the current semester, if not set.

/resources/resource/:resource_id/semester_plan

◆ toggleResourceBookingIntervalTakesPlaceField()

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: