/** * @param array $row * @return BookableResource */ public static function Create($row) { $resource = new BookableResource($row[ColumnNames::RESOURCE_ID], $row[ColumnNames::RESOURCE_NAME], $row[ColumnNames::RESOURCE_LOCATION], $row[ColumnNames::RESOURCE_CONTACT], $row[ColumnNames::RESOURCE_NOTES], $row[ColumnNames::RESOURCE_MINDURATION], $row[ColumnNames::RESOURCE_MAXDURATION], $row[ColumnNames::RESOURCE_AUTOASSIGN], $row[ColumnNames::RESOURCE_REQUIRES_APPROVAL], $row[ColumnNames::RESOURCE_ALLOW_MULTIDAY], $row[ColumnNames::RESOURCE_MAX_PARTICIPANTS], $row[ColumnNames::RESOURCE_MINNOTICE], $row[ColumnNames::RESOURCE_MAXNOTICE], $row[ColumnNames::RESOURCE_DESCRIPTION], $row[ColumnNames::SCHEDULE_ID]); $resource->SetImage($row[ColumnNames::RESOURCE_IMAGE_NAME]); $resource->SetAdminGroupId($row[ColumnNames::RESOURCE_ADMIN_GROUP_ID]); $resource->SetSortOrder($row[ColumnNames::RESOURCE_SORT_ORDER]); $resource->ChangeStatus($row[ColumnNames::RESOURCE_STATUS_ID], $row[ColumnNames::RESOURCE_STATUS_REASON_ID]); $resource->WithPublicId($row[ColumnNames::PUBLIC_ID]); $resource->WithSubscription($row[ColumnNames::ALLOW_CALENDAR_SUBSCRIPTION]); $resource->WithScheduleAdminGroupId($row[ColumnNames::SCHEDULE_ADMIN_GROUP_ID_ALIAS]); $resource->SetResourceTypeId($row[ColumnNames::RESOURCE_TYPE_ID]); $resource->SetBufferTime($row[ColumnNames::RESOURCE_BUFFER_TIME]); return $resource; }