quipthread.class.php
- package
- quip
- Classes
- quipThread
Description
Quip
Copyright 2010-11 by Shaun McCormick shaun@modx.com
This file is part of Quip, a simple commenting component for MODx Revolution.
Quip is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Quip is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Quip; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\quipThread
- Extends from
- \xPDOObject
- package
- quip
- Methods
- _loadLexicon
- checkIfStillOpen
- checkPolicy
- getModeratorEmails
- makeUrl
- notify
- sendEmail
- sync
- trimArray
Description
Methods
_loadLexicon
_loadLexicon(
)
:
bool
Ensure that the Lexicon is loaded for the modX instance
Output
- bool
- True if loaded
Details
- visibility
- protected
- final
- false
- static
- false
checkIfStillOpen
checkIfStillOpen(
integer $closeAfter
=
14
)
:
boolean
Checks to see if the thread has been auto-closed after a specified number of days.
Arguments
- $closeAfter
- integer
The number of days to close the thread after.
Output
- boolean
- True if still open
Details
- visibility
- public
- final
- false
- static
- false
checkPolicy
checkPolicy(
string $permission
)
:
boolean
Checks whether or not the user has access to the specified permission.
Arguments
- $permission
- string
Output
- boolean
- True if user has permission
Details
- visibility
- public
- final
- false
- static
- false
getModeratorEmails
getModeratorEmails(
)
:
array
Gets an array of emails for all moderators of this thread
Output
- array
Details
- visibility
- public
- final
- false
- static
- false
makeUrl
makeUrl(
int $resource
=
0, array $params
=
array, array $options
=
array
)
:
string
Make the URL of the Quip thread for easy reference
Arguments
- $resource
- int
The ID of the resource to make from - $params
- array
Any params to add to the URL - $options
- array
An array of options for URL building
Output
- string
- The created URL
Details
- visibility
- public
- final
- false
- static
- false
notify
notify(
\quipComment $comment
)
:
boolean
Sends notification to all watchers of this thread saying a new post has been made.
Arguments
- $comment
- \quipComment
A reference to the actual comment
Output
- boolean
- True if successful
Details
- visibility
- public
- final
- false
- static
- false
sendEmail
sendEmail(
string $subject, string $body, string $to
)
:
bool
Sends an email for this thread
Arguments
- $subject
- string
- $body
- string
- $to
- string
Output
- bool
Details
- visibility
- protected
- final
- false
- static
- false
sync
sync(
array $scriptProperties
=
array
)
:
bool
Sync the thread object
Arguments
- $scriptProperties
- array
Output
- bool
- True if changed
Details
- visibility
- public
- final
- false
- static
- false
trimArray
trimArray(
array $array, string $delimiter
=
,
)
:
string
Trims an array's values to remove whitespaces. If value passed is a string, explodes it first.
Arguments
- $array
- array
- $delimiter
- string
Output
- string
Details
- visibility
- protected
- final
- false
- static
- false