|
Stud.IP
jlu_4.3 Revision 64286
|


Public Member Functions | |
| cbValidate () | |
| __toString () | |
| createRequest (User $user, $date_range_id=null, $comment='', $properties=[], $preparation_time=0) | |
| addChild (Resource $resource) | |
| getFullName () | |
| getDefaultPictureUrl () | |
| getIcon ($role='info') | |
| checkHierarchy () | |
| bookingPlanVisibleForUser (User $user, $time_range=[]) | |
| getLink ($action='show', $link_parameters=[]) | |
| getURL ($action='show', $url_parameters=[]) | |
| findBuilding () | |
Public Member Functions inherited from Resource | |
| store () | |
| delete () | |
| cbValidate () | |
| __toString () | |
| getFolder () | |
| setFolder (ResourceFolder $folder) | |
| createFolder () | |
| createSimpleBooking (User $user, DateTime $begin, DateTime $end, $preparation_time=0, $description='', $internal_comment='', $booking_type=0) | |
| createBookingFromRequest (User $user, ResourceRequest $request, $preparation_time=0, $description='', $internal_comment='', $booking_type=0, $prepend_preparation_time=false, $notify_lecturers=false) | |
| createBooking (User $user, $range_id=null, $time_ranges=[], $repetition_interval=null, $repetition_amount=0, $repetition_end_date=null, $preparation_time=0, $description='', $internal_comment='', $booking_type=0, $force_booking=false) | |
| createSimpleRequest (User $user, DateTime $begin, DateTime $end, $comment='', $preparation_time=0) | |
| createRequest (User $user, $date_range_ids=null, $comment='', $properties=[], $preparation_time=0) | |
| createLock (User $user, DateTime $begin, DateTime $end, $internal_comment='') | |
| getGroupedProperties ($excluded_properties=[]) | |
| propertyExists ($name='') | |
| getPropertyObject ($name='') | |
| getProperty ($name='') | |
| getPropertyRelatedObject ($name='') | |
| setProperty ($name='', $state='', $user=null) | |
| setPropertiesByName ($properties=[], $user) | |
| setPropertiesById ($properties=[], $user=null) | |
| isPropertyEditable ($name='', User $user) | |
| setPropertyByDefinitionId ( $property_definition_id=null, $state=null) | |
| setPropertyRelatedObject ($name='', $object=null) | |
| deleteProperty ($name='', User $user) | |
| getPictureUrl () | |
| getDefaultPictureUrl () | |
| getIcon ($role='info') | |
| getPropertyArray ($only_requestable_properties=false) | |
| isAssigned (DateTime $begin, DateTime $end, $excluded_booking_ids=[]) | |
| isReserved (DateTime $begin, DateTime $end, $excluded_reservation_ids=[]) | |
| isLocked (DateTime $begin, DateTime $end, $excluded_lock_ids=[]) | |
| isAvailable (DateTime $begin, DateTime $end, $excluded_booking_ids=[]) | |
| isAvailableForRequest (ResourceRequest $request) | |
| getFullName () | |
| setUserPermission (User $user, $perm='autor') | |
| deleteUserPermission (User $user) | |
| deleteAllPermissions () | |
| getUserPermission (User $user, $time_range=[], $permanent_only=false) | |
| userHasPermission (User $user, $permission='user', $time_range=[], $permanent_only=false) | |
| userMayCreateChild (User $user) | |
| userHasBookingRights (User $user, $begin=null, $end=null) | |
| bookingPlanVisibleForUser (User $user, $time_range=[]) | |
| findParentByClassName ($class_name='Resource') | |
| findChildrenByClassName ( $class_name='Resource', $depth=0, $convert_objects=true, $order_by_name=true) | |
| addChild (Resource $resource) | |
| getOpenResourceRequests (DateTime $begin, DateTime $end) | |
| getResourceBookings (DateTime $begin, DateTime $end) | |
| getResourceLocks (DateTime $begin, DateTime $end) | |
| hasFiles () | |
| getDerivedClassInstance () | |
| checkHierarchy () | |
| getHierarchyPath ($separator='/', $prepend_root=true) | |
| getLink ($action='show', $link_parameters=[]) | |
| getURL ($action='show', $url_parameters=[]) | |
| getItemName ($long_format=true) | |
| getItemURL () | |
| getItemAvatarURL () | |
Public Member Functions inherited from SimpleORMap | |
| __construct ($id=null) | |
| __clone () | |
| getRelationOptions ($relation) | |
| getTableMetadata () | |
| hasAutoIncrementColumn () | |
| setId ($id) | |
| getId () | |
| getNewId () | |
| toArray ($only_these_fields=null) | |
| toRawArray ($only_these_fields=null) | |
| toArrayRecursive ($only_these_fields=null) | |
| getValue ($field) | |
| getRelationValue ($relation, $field) | |
| getDefaultValue ($field) | |
| setValue ($field, $value) | |
| __get ($field) | |
| __set ($field, $value) | |
| __isset ($field) | |
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
| getIterator () | |
| count () | |
| isField ($field) | |
| isAdditionalField ($field) | |
| isAliasField ($field) | |
| isI18nField ($field) | |
| setData ($data, $reset=false) | |
| isNew () | |
| isDeleted () | |
| setNew ($is_new) | |
| getWhereQuery () | |
| restore () | |
| store () | |
| triggerChdate () | |
| delete () | |
| isDirty () | |
| isFieldDirty ($field) | |
| revertValue ($field) | |
| getPristineValue ($field) | |
| initRelation ($relation) | |
| resetRelation ($relation) | |
| cleanup () | |
| getItemName ($long_format=true) | |
| getItemURL () | |
| getItemAvatarURL () | |
Static Public Member Functions | |
| static | getTranslatedClassName ($item_count=1) |
| static | countAll () |
| static | findAll () |
| static | findByNameOrBuilding ($room, $building) |
| static | getRequiredProperties () |
| static | findByBuilding ($building_id=null) |
| static | findByRoomRequestAndProperties (RoomRequest $request, User $user, $offset=0, $limit=0, $searchable_rooms=[], $properties=[]) |
| static | findOtherRoomParts (Room $room) |
| static | getAllRoomTypes () |
| static | getLinkForAction ( $action='show', $id=null, $link_parameters=[]) |
| static | getURLForAction ( $action='show', $id=null, $url_parameters=[]) |
Static Public Member Functions inherited from Resource | |
| static | getTranslatedClassName ($item_count=1) |
| static | getRootResources () |
| static | getRequiredProperties () |
| static | getLinkForAction ( $action='show', $id=null, $link_parameters=[]) |
| static | getURLForAction ( $action='show', $id=null, $url_parameters=[]) |
Static Public Member Functions inherited from SimpleORMap | |
| static | tableScheme ($db_table) |
| static | expireTableScheme () |
| static | find ($id) |
| static | exists ($id) |
| static | countBySql ($sql=1, $params=array()) |
| static | create ($data) |
| static | build ($data, $is_new=true) |
| static | buildExisting ($data) |
| static | import ($data) |
| static | findBySQL ($sql, $params=array()) |
| static | findOneBySQL ($where, $params=array()) |
| static | findThru ($foreign_key_value, $options) |
| static | findEachBySQL ($callable, $sql, $params=array()) |
| static | findMany ($pks=array(), $order='', $order_params=array()) |
| static | findEachMany ($callable, $pks=array(), $order='', $order_params=array()) |
| static | findAndMapBySQL ($callable, $where, $params=array()) |
| static | findAndMapMany ($callable, $pks=array(), $order='', $order_params=array()) |
| static | deleteBySQL ($where, $params=array()) |
| static | toObject ($id_or_object) |
| static | __callStatic ($name, $arguments) |
Static Protected Member Functions | |
| static | configure ($config=[]) |
| static | buildPathForAction ($action='show', $id=null) |
| static | configure ($config=[]) |
| static | buildPathForAction ($action='show', $id=null) |
Static Protected Member Functions inherited from SimpleORMap | |
| static | configure ($config=array()) |
| static | config ($key) |
Static Protected Attributes | |
| static | $required_properties |
Static Protected Attributes inherited from Resource | |
| static | $permission_cache |
Static Protected Attributes inherited from SimpleORMap | |
| static | $config = array() |
| static | $reserved_slots = array('value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id') |
The Room class is a derived class of the Resource class. It containts specialisations for room resources.
| __toString | ( | ) |
| addChild | ( | Resource | $resource | ) |
Adds a child resource to this room. The child resource must not be a resource of the class Room, Building or Location.
| Resource | $resource | The resource which shall be added as child. |
| InvalidResourceException | If the specified resource belongs to the resource classes Room, Building or Location. |
Reimplemented from Resource.
|
staticprotected |
Returns the part of the URL for getLink and getURL which will be placed inside the calls to URLHelper::getLink and URLHelper::getURL in these methods.
| string | $action | The action for the room. |
| string | $id | The ID of the room. |
| InvalidArgumentException | If $room_id is empty. |
Reimplemented from Resource.
| cbValidate | ( | ) |
| checkHierarchy | ( | ) |
Checks if the place in the resource hierarchy (resource tree) is correct for this resource. This method has no function in this class but can be filled with logic in one of the classes derived from Resource.
| NoResourceClassException | if the class name of this resource is not a derived class of the Resource class. |
Reimplemented from Resource.

|
staticprotected |
set configuration data from subclass
| array | $config | configuration data |
Reimplemented from Resource.
|
static |

| createRequest | ( | User | $user, |
$date_range_id = null, |
|||
$comment = '', |
|||
$properties = [], |
|||
$preparation_time = 0 |
|||
| ) |
This method calls Resource::createRequest and transforms the resulting ResourceRequest object into a RoomRequest object.
Reimplemented from Resource.

|
static |

| findBuilding | ( | ) |
|
static |
Finds rooms by a building specified by its ID.
| string | $building_id | The ID of the building. |


|
static |

|
static |
Returns rooms that match the criteria of the room request.
| RoomRequest | $request | A RoomRequest object. |
| User | $user | The user who wishes to search for rooms matching the room request. |
| int | $offset | An offset for the result set. |
| int | $limit | A limit for the result set. |
| Room[] | $searchable_rooms | An (optional) array of rooms which will limit the search to the rooms in the array. |
| Array | $properties | An array providing request properties and their values in case the request doesn't have (the desired) properties set. |


|
static |
Determins if the specified room is a room part and then returns all other room parts.
| Room | $room | The room part whose other room parts shall be found. |


|
static |
Retrieves all existing room types from the database. Only room types which have at least one room object with that type in the database are considered here.

| getDefaultPictureUrl | ( | ) |
Returns the default picture for the resource class.
Classes derived from Resource should re-implement this method if they want to get a different default picture than the resource icon. The call to getPictureUrl will call the getDefaultPictureUrl method from the derived class.
Reimplemented from Resource.

| getFullName | ( | ) |
Returns the full name of this room.
Reimplemented from Resource.

| getIcon | ( | $role = 'info' | ) |
Returns the Icon for the resource class.
Classes derived from Resource should re-implement this method if they want to get a different icon than the resource icon.
Reimplemented from Resource.


| getLink | ( | $action = 'show', |
|
$link_parameters = [] |
|||
| ) |
Returns the link for an action for this room. This is the non-static variant of Room::getLinkForAction.
| string | $action | The action which shall be executed. For rooms the actions 'show', 'booking_plan', 'add', 'edit' and 'delete' are defined. |
| array | $link_parameters | Optional parameters for the link. |
Reimplemented from Resource.

|
static |
Returns the appropriate link for the room action that shall be executed on a room.
| string | $action | The action which shall be executed. For rooms the actions 'show', 'booking_plan', 'add', 'edit' and 'delete' are defined. |
| string | $id | The ID of the room on which the specified action shall be executed. |
| array | $link_parameters | Optional parameters for the link. |
| InvalidArgumentException | If $room_id is empty. |
Reimplemented from Resource.


|
static |
A method for overloaded classes so that they can define properties that are required for that resource class.
Reimplemented from Resource.
|
static |
Returns a translation of the resource class name. The translated name can be singular or plural, depending on the value of the parameter $item_count.
| int | $item_count | The amount of items the translation shall be made for. This is only used to determine, if a singular or a plural form shall be returned. |
Reimplemented from Resource.
| getURL | ( | $action = 'show', |
|
$url_parameters = [] |
|||
| ) |
Returns the URL for an action for this room. This is the non-static variant of Room::getURLForAction.
| string | $action | The action which shall be executed. For rooms the actions 'show', 'booking_plan', 'add', 'edit' and 'delete' are defined. |
| array | $url_parameters | Optional parameters for the URL. |
Reimplemented from Resource.

|
static |
Returns the appropriate URL for the room action that shall be executed on a room.
| string | $action | The action which shall be executed. For rooms the actions 'show', 'booking_plan', 'add', 'edit' and 'delete' are defined. |
| string | $id | The ID of the room on which the specified action shall be executed. |
| array | $url_parameters | Optional parameters for the URL. |
| InvalidArgumentException | If $room_id is empty. |
Reimplemented from Resource.


|
staticprotected |