Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Curriculum-Request
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tim Steiner
Curriculum-Request
Commits
85d9a11c
Commit
85d9a11c
authored
17 years ago
by
Tim Steiner
Browse files
Options
Downloads
Patches
Plain Diff
Added some docblocks to Requests.php
parent
81f8aa2c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/models/tables/Requests.php
+27
-0
27 additions, 0 deletions
application/models/tables/Requests.php
with
27 additions
and
0 deletions
application/models/tables/Requests.php
+
27
−
0
View file @
85d9a11c
...
...
@@ -24,6 +24,11 @@ class Requests extends Nmc_Db_Table
return
self
::
$_instance
;
}
/**
* Fetch a row
*
* @return Request
*/
public
function
fetchNew
()
{
$new
=
parent
::
fetchNew
();
...
...
@@ -31,6 +36,14 @@ class Requests extends Nmc_Db_Table
return
$new
;
}
/**
* Fetch all requests initiated by the given user.
* Option to include or hide completed requests.
*
* @param Person $user
* @param int $completedRequests
* @return Nmc_Db_Table_Rowset
*/
public
function
getRequestsForUser
(
Person
$user
,
$completedRequests
=
self
::
COMPLETED_REQUESTS_NO
)
{
...
...
@@ -41,6 +54,14 @@ class Requests extends Nmc_Db_Table
return
$requests
;
}
/**
* Fetches all requests.
* Option to include or hide completed requests.
*
* @param string $where
* @param int $completedRequests
* @return Nmc_Db_Table_Rowset
*/
public
function
fetchAllSorted
(
$where
=
null
,
$completedRequests
=
self
::
COMPLETED_REQUESTS_NO
)
{
...
...
@@ -91,6 +112,12 @@ class Requests extends Nmc_Db_Table
return
$requests
;
}
/**
* Fetch all requests currently pending at the given action
*
* @param ApprovalAction $action
* @return Nmc_Db_Table_Rowset
*/
public
function
fetchAllWithCurrentAction
(
ApprovalAction
$action
)
{
$db
=
$this
->
getAdapter
();
$select
=
new
Zend_Db_Select
(
$db
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment