class CommunityGroupsController extends CommunityBaseController


Located at : UKNOWVA_ROOT/components/com_community/controllers/groups.php

Properties

$_modelInstances from CommunityBaseController
$_libraryInstances from CommunityBaseController
$_viewInstances from CommunityBaseController
$_name from CommunityBaseController
$my from CommunityBaseController

Methods

__construct(array $config = array())

Constructor.

string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
static void
addModelPath(mixed $path, string $prefix = '')

Adds to the stack of model paths in LIFO order.

static mixed
getInstance(string $prefix, array $config = array())

Method to get a singleton controller instance.

addViewPath(mixed $path)

Add one or more view paths to the controller's stack, in LIFO order.

boolean
authorize(string $task) deprecated

Authorisation check

boolean
authorise(string $task)

Authorisation check

display()

Displays the default groups view

mixed
execute(string $task = '')

Execute a request

object
getModel(string $name = '', string $prefix = '', array $config = array())

Return the model object, responsible for all db manipulation. Singleton

string
getName()

Method to get the controller name

string
getTask()

Get the last task that is being performed or was most recently performed.

array
getTasks()

Gets the available tasks in the controller.

object
getView($viewName = 'frontpage', string $prefix = '', $viewType = '')

Return the view object, which will output the final html. The view object is a singleton

boolean
redirect()

Redirects the browser or returns false if no redirect is set.

registerDefaultTask(string $method)

Register the default task to perform if a mapping is not found.

registerTask(string $task, string $method)

Register (map) a task to a method in the class.

unregisterTask(string $task)

Unregister (unmap) a task in the class.

void
setAccessControl(string $section, string $value = null) deprecated

Sets the access control levels.

string
setMessage(string $text, string $type = 'message')

Sets the internal message that is passed with a redirect

setRedirect(string $url, string $msg = null, string $type = null)

Set a URL for browser redirection.

CommunityBaseController($config = array())

No description

_notify($cmd, $from, $to, $subject, $body, $template = '', $params = '')

Deprecated since 1.8.x

ajaxBlockUnregister()

A guest trying to use registered-only part of the system via ajax. Display a link to register

blockUserAccess()

Block user access to the controller method.

blockUnregister($uri = null)

No description

loadHelper($name)

No description

getLibrary($name = '', $prefix = '', $config = array())

No description

executeMobile($task = '')

No description

executeAjax($method, $ajaxArg)

Execute ajax request

ajaxBlock()

restrict blocked user to access owner details

ajaxRestrictBlockAdmin()

restrict user to block community admin

cacheClean($cacheId)

No description

renderView(string $viewfunc, mixed $var = NULL)

Call the View object to compose the resulting HTML display

inviteUsers($cid, $users, $emails, $message)

Responsible to return necessary contents to the Invitation library so that it can add the mails into the queue

editGroupWall($wallId)

No description

editDiscussionWall($wallId)

No description

ajaxRemoveFeatured($groupId)

No description

ajaxAddFeatured($groupId)

No description

reportDiscussion($link, $message, $discussionId)

Method is called from the reporting library. Function calls should be registered here.

removeDiscussion($discussionId)

No description

reportGroup($link, $message, $groupId)

Method is called from the reporting library. Function calls should be registered here.

unpublishGroup($groupId)

No description

app()

Full application view

discussApp()

Full application view for discussion

ajaxAcceptInvitation($groupId)

No description

ajaxRejectInvitation($groupId)

No description

ajaxUnpublishGroup($groupId)

Ajax function to unpublish a group

ajaxDeleteGroup($groupId, $step = 1)

Ajax function to delete a group

ajaxWarnGroupDeletion($groupId)

Ajax function to prompt warning during group deletion

ajaxRemoveReply($wallId)

Ajax function to remove a reply from the discussions

ajaxShowRemoveBulletin($groupid, $bulletinId)

Ajax function to display the remove bulletin information

ajaxShowRemoveDiscussion($groupid, $topicid)

Ajax function to display the remove discussion information

ajaxShowLockDiscussion($groupid, $topicid)

No description

ajaxApproveMember($memberId, $groupId)

Ajax function to approve a specific member

ajaxConfirmMemberRemoval($memberId, $groupId)

No description

ajaxRemoveMember($memberId, $groupId)

Ajax method to remove specific member

ajaxShowLeaveGroup($groupId)

Ajax method to display HTML codes to leave group

ajaxShowJoinGroup($groupId, $redirectUrl)

Ajax function to display the join group

ajaxRemoveWall(wallId $wallId)

Ajax Method to remove specific wall from the specific group

ajaxRemoveAdmin(memberid $memberId, groupid $groupId)

Ajax function to add new admin to the group

ajaxAddAdmin(memberid $memberId, groupid $groupId)

Ajax function to add new admin to the group

updateAdmin($memberId, $groupId, $doAdd = true)

No description

ajaxSaveDiscussionWall(message $message, uniqueId $uniqueId)

Ajax function to save a new wall entry

ajaxSaveWall(message $message, uniqueId $groupId) deprecated

Ajax function to save a new wall entry

ajaxUpdateCount($type, $groupid)

No description

ajaxUnbanMember($memberId, $groupId)

No description

type
ajaxBanMember(type $memberId, type $groupId)

Ban the member from the group

updateMemberBan($memberId, $groupId, $doBan = true)

Refactored from AjaxUnBanMember and AjaxBanMember

edit()

No description

create()

Method to display the create group form

created()

A new group has been created

false
save()

Method to save the group

search()

Method to search for a group based on the parameter given in a POST request

leaveGroup()

Ajax function call that allows user to leave group

void
joinGroup()

Method is used to receive POST requests from specific user that wants to join a group

uploadAvatar()

No description

viewGroup()

Method that loads the viewing of a specific group

mygroups()

Show only current user group

myinvites()

No description

viewmembers()

No description

viewbulletin()

Show full view of the news for the group

viewbulletins()

Show all news from specific groups

viewdiscussions()

Show all discussions from specific groups

adddiscussion()

No description

viewdiscussion()

Show discussion

invitefriends()

Show Invite

editDiscussion()

No description

editNews()

No description

addNews()

Method to add a new discussion

deleteTopic()

No description

lockTopic()

No description

deleteBulletin()

No description

sendmail()

Displays send email form and processes the sendmail

triggerGroupEvents($eventName, $args, $target = null)

No description

banlist()

No description

void
ajaxJoinGroup($groupId, $fastJoin = 'no')

Method is used to receive POST requests from specific user that wants to join a group

Details

in JController at line 292
JObject __construct(array $config = array())

Constructor.

Parameters

array $config An optional associative array of configuration settings. Recognized key values include 'name', 'defaulttask', 'modelpath', and 'view_path' (this list is not meant to be comprehensive).

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JController at line 156
static void addModelPath(mixed $path, string $prefix = '')

Adds to the stack of model paths in LIFO order.

Parameters

mixed $path The directory (string), or list of directories (array) to add.
string $prefix A prefix for models

Return Value

void

in JController at line 212
static mixed getInstance(string $prefix, array $config = array())

Method to get a singleton controller instance.

Parameters

string $prefix The prefix for the controller.
array $config An array of optional constructor options.

Return Value

mixed JController derivative class or JException on error.

in JController at line 427
JController addViewPath(mixed $path)

Add one or more view paths to the controller's stack, in LIFO order.

Parameters

mixed $path The directory (string) or list of directories (array) to add.

Return Value

JController This object to support chaining.

in JController at line 445
boolean authorize(string $task) deprecated

deprecated 12.1 Use JAuthorise

Authorisation check

Parameters

string $task The ACO Section Value to check access on

Return Value

boolean True if authorised

in JController at line 461
boolean authorise(string $task)

Authorisation check

Parameters

string $task The ACO Section Value to check access on.

Return Value

boolean True if authorised

at line 313
JController display()

Displays the default groups view

Return Value

JController A JController object to support chaining.

mixed execute(string $task = '')

Execute a request

Parameters

string $task The task to perform. If no matching task is found, the '__default' task is executed, if defined.

Return Value

mixed The value returned by the called method, false in error case.

object getModel(string $name = '', string $prefix = '', array $config = array())

Return the model object, responsible for all db manipulation. Singleton

Parameters

string $name The model name. Optional.
string $prefix The class prefix. Optional.
array $config Configuration array for model. Optional.

Return Value

object The model.

string getName()

Method to get the controller name

The dispatcher name is set by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor

Return Value

string The name of the dispatcher

in JController at line 761
string getTask()

Get the last task that is being performed or was most recently performed.

Return Value

string The task that is being performed or was most recently performed.

in JController at line 772
array getTasks()

Gets the available tasks in the controller.

Return Value

array Array[i] of task names.

object getView($viewName = 'frontpage', string $prefix = '', $viewType = '')

Return the view object, which will output the final html. The view object is a singleton

Parameters

$viewName
string $prefix The class prefix. Optional.
$viewType

Return Value

object Reference to the view or an error.

in JController at line 857
boolean redirect()

Redirects the browser or returns false if no redirect is set.

Return Value

boolean False if no redirect exists.

in JController at line 875
JController registerDefaultTask(string $method)

Register the default task to perform if a mapping is not found.

Parameters

string $method The name of the method in the derived class to perform if a named task is not found.

Return Value

JController A JController object to support chaining.

in JController at line 891
JController registerTask(string $task, string $method)

Register (map) a task to a method in the class.

Parameters

string $task The task.
string $method The name of the method in the derived class to perform for this task.

Return Value

JController A JController object to support chaining.

in JController at line 908
JController unregisterTask(string $task)

Unregister (unmap) a task in the class.

Parameters

string $task The task.

Return Value

JController This object to support chaining.

in JController at line 958
void setAccessControl(string $section, string $value = null) deprecated

deprecated 12.1 Use JAccess

Sets the access control levels.

Parameters

string $section The ACO section (eg, the component).
string $value The ACO section value (if using a constant value).

Return Value

void

See also

Jaccess

in JController at line 973
string setMessage(string $text, string $type = 'message')

Sets the internal message that is passed with a redirect

Parameters

string $text Message to display on redirect.
string $type Message type (since 11.1). Optional, defaults to 'message'.

Return Value

string Previous message

in JController at line 1013
JController setRedirect(string $url, string $msg = null, string $type = null)

Set a URL for browser redirection.

Parameters

string $url URL to redirect to.
string $msg Message to display on redirect. Optional, defaults to value set internally by controller, if any.
string $type Message type. Optional, defaults to 'message' or the type set by a previous call to setMessage.

Return Value

JController This object to support chaining.

CommunityBaseController($config = array())

Parameters

$config

_notify($cmd, $from, $to, $subject, $body, $template = '', $params = '')

Deprecated since 1.8.x

Parameters

$cmd
$from
$to
$subject
$body
$template
$params

ajaxBlockUnregister()

A guest trying to use registered-only part of the system via ajax. Display a link to register

blockUserAccess()

Block user access to the controller method.

blockUnregister($uri = null)

Parameters

$uri

loadHelper($name)

Parameters

$name

getLibrary($name = '', $prefix = '', $config = array())

Parameters

$name
$prefix
$config

executeMobile($task = '')

Parameters

$task

executeAjax($method, $ajaxArg)

Execute ajax request

Parameters

$method
$ajaxArg

ajaxBlock()

restrict blocked user to access owner details

ajaxRestrictBlockAdmin()

restrict user to block community admin

cacheClean($cacheId)

Parameters

$cacheId

at line 22
renderView(string $viewfunc, mixed $var = NULL)

Call the View object to compose the resulting HTML display

Parameters

string $viewfunc View function to be called
mixed $var extra data to be passed to the View

at line 38
inviteUsers($cid, $users, $emails, $message)

Responsible to return necessary contents to the Invitation library so that it can add the mails into the queue

Parameters

$cid
$users
$emails
$message

at line 89
editGroupWall($wallId)

Parameters

$wallId

at line 111
editDiscussionWall($wallId)

Parameters

$wallId

at line 136
ajaxRemoveFeatured($groupId)

Parameters

$groupId

at line 176
ajaxAddFeatured($groupId)

Parameters

$groupId

at line 227
reportDiscussion($link, $message, $discussionId)

Method is called from the reporting library. Function calls should be registered here.

return String Message that will be displayed to user upon submission.

Parameters

$link
$message
$discussionId

at line 245
removeDiscussion($discussionId)

Parameters

$discussionId

at line 273
reportGroup($link, $message, $groupId)

Method is called from the reporting library. Function calls should be registered here.

return String Message that will be displayed to user upon submission.

Parameters

$link
$message
$groupId

at line 298
unpublishGroup($groupId)

Parameters

$groupId

at line 330
app()

Full application view

at line 340
discussApp()

Full application view for discussion

at line 347
ajaxAcceptInvitation($groupId)

Parameters

$groupId

at line 372
ajaxRejectInvitation($groupId)

Parameters

$groupId

at line 404
ajaxUnpublishGroup($groupId)

Ajax function to unpublish a group

Parameters

$groupId The specific group id to unpublish

at line 457
ajaxDeleteGroup($groupId, $step = 1)

Ajax function to delete a group

Parameters

$groupId
$step

at line 652
ajaxWarnGroupDeletion($groupId)

Ajax function to prompt warning during group deletion

Parameters

$groupId The specific group id to unpublish

at line 678
ajaxRemoveReply($wallId)

Ajax function to remove a reply from the discussions

Parameters

$wallId

at line 732
ajaxShowRemoveBulletin($groupid, $bulletinId)

Ajax function to display the remove bulletin information

Parameters

$groupid
$bulletinId

at line 767
ajaxShowRemoveDiscussion($groupid, $topicid)

Ajax function to display the remove discussion information

Parameters

$groupid
$topicid

at line 799
ajaxShowLockDiscussion($groupid, $topicid)

Parameters

$groupid
$topicid

at line 842
ajaxApproveMember($memberId, $groupId)

Ajax function to approve a specific member

Parameters

$memberId
$groupId

at line 893
ajaxConfirmMemberRemoval($memberId, $groupId)

Parameters

$memberId
$groupId

at line 940
ajaxRemoveMember($memberId, $groupId)

Ajax method to remove specific member

Parameters

$memberId
$groupId

at line 1005
ajaxShowLeaveGroup($groupId)

Ajax method to display HTML codes to leave group

Parameters

$groupId

at line 1045
ajaxShowJoinGroup($groupId, $redirectUrl)

Ajax function to display the join group

Parameters

$groupId
$redirectUrl

at line 1104
ajaxRemoveWall(wallId $wallId)

Ajax Method to remove specific wall from the specific group

Parameters

wallId $wallId The unique wall id that needs to be removed.

at line 1163
ajaxRemoveAdmin(memberid $memberId, groupid $groupId)

Ajax function to add new admin to the group

Parameters

memberid $memberId Members id
groupid $groupId Groupid

at line 1175
ajaxAddAdmin(memberid $memberId, groupid $groupId)

Ajax function to add new admin to the group

Parameters

memberid $memberId Members id
groupid $groupId Groupid

at line 1180
updateAdmin($memberId, $groupId, $doAdd = true)

Parameters

$memberId
$groupId
$doAdd

at line 1223
ajaxSaveDiscussionWall(message $message, uniqueId $uniqueId)

Ajax function to save a new wall entry

Parameters

message $message A message that is submitted by the user
uniqueId $uniqueId The unique id for this group

at line 1366
ajaxSaveWall(message $message, uniqueId $groupId) deprecated

deprecated since 2.4

Ajax function to save a new wall entry

Parameters

message $message A message that is submitted by the user
uniqueId $groupId The unique id for this group

at line 1507
ajaxUpdateCount($type, $groupid)

Parameters

$type
$groupid

at line 1539
ajaxUnbanMember($memberId, $groupId)

Parameters

$memberId
$groupId

at line 1550
type ajaxBanMember(type $memberId, type $groupId)

Ban the member from the group

Parameters

type $memberId
type $groupId

Return Value

type

at line 1558
updateMemberBan($memberId, $groupId, $doBan = true)

Refactored from AjaxUnBanMember and AjaxBanMember

Parameters

$memberId
$groupId
$doBan

at line 1610
edit()

at line 1745
create()

Method to display the create group form

at line 1819
created()

A new group has been created

at line 1917
false save()

Method to save the group

Return Value

false if create fail, return the group id if create is successful

Method to search for a group based on the parameter given in a POST request

at line 2122
leaveGroup()

Ajax function call that allows user to leave group

at line 2170
void joinGroup()

Method is used to receive POST requests from specific user that wants to join a group

Return Value

void

at line 2258
uploadAvatar()

at line 2399
viewGroup()

Method that loads the viewing of a specific group

at line 2420
mygroups()

Show only current user group

at line 2438
myinvites()

at line 2452
viewmembers()

at line 2472
viewbulletin()

Show full view of the news for the group

at line 2490
viewbulletins()

Show all news from specific groups

at line 2508
viewdiscussions()

Show all discussions from specific groups

at line 2689
adddiscussion()

at line 2742
viewdiscussion()

Show discussion

at line 2758
invitefriends()

Show Invite

at line 2827
editDiscussion()

at line 2865
editNews()

at line 2920
addNews()

Method to add a new discussion

at line 3065
deleteTopic()

at line 3116
lockTopic()

at line 3164
deleteBulletin()

at line 3215
sendmail()

Displays send email form and processes the sendmail

at line 3300
triggerGroupEvents($eventName, $args, $target = null)

Parameters

$eventName
$args
$target

at line 3318
banlist()

at line 3332
void ajaxJoinGroup($groupId, $fastJoin = 'no')

Method is used to receive POST requests from specific user that wants to join a group

Parameters

$groupId
$fastJoin

Return Value

void