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
d8305168
Commit
d8305168
authored
14 years ago
by
Tim Steiner
Browse files
Options
Downloads
Patches
Plain Diff
Adding a few PHPDoc blocks.
parent
fb98d66d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
library/App/Model/ApprovalActionInterface.php
+7
-0
7 additions, 0 deletions
library/App/Model/ApprovalActionInterface.php
library/App/RequestNotification.php
+26
-0
26 additions, 0 deletions
library/App/RequestNotification.php
with
33 additions
and
0 deletions
library/App/Model/ApprovalActionInterface.php
+
7
−
0
View file @
d8305168
<?php
/**
* Provides an interface for creating additional Approval Action types.
* An approval action represents a point at which some entity may potentially
* modify a request and then make a decision about the request (by modifying
* its status). A Model implementing this interface will be a child of Unl_Model.
*/
interface
App_Model_ApprovalActionInterface
{
/**
...
...
This diff is collapsed.
Click to expand it.
library/App/RequestNotification.php
+
26
−
0
View file @
d8305168
<?php
/**
* This class handles the generation and scheduling of email notifications
* that alert users of requests that are pending their decisions.
*/
class
App_RequestNotification
{
/**
* Stores the list of notifications once it has been generated to avoid
* needlessly reproccessing it.
*
* @var array
*/
static
protected
$_notifications
;
/**
* Does the work of processing which users have pending requests and populates
* $_notifications with the list.
*/
static
protected
function
_loadNotifications
()
{
if
(
Unl_Util
::
isArray
(
self
::
$_notifications
))
{
...
...
@@ -81,6 +96,10 @@ class App_RequestNotification
}
}
/**
* Prints out a simple list of the notifications in plain text.
* Mainly useful when debugging.
*/
public
static
function
listNotifications
()
{
self
::
_loadNotifications
();
...
...
@@ -93,6 +112,9 @@ class App_RequestNotification
}
}
/**
* Sends out an email to each user who has pending requests.
*/
public
static
function
sendNotifications
()
{
self
::
_loadNotifications
();
...
...
@@ -150,6 +172,10 @@ EOF
}
}
/**
* Sends out email notifications, then schedules itself to be called again in two days.
* This should really only be called by a cron job.
*/
public
static
function
scheduledNotifications
()
{
self
::
sendNotifications
();
...
...
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