class HeartbeatFlagPlugin in Heartbeat 7
HeartbeatFlagPlugin abstract class.
Hierarchy
- class \HeartbeatBasePlugin
- class \HeartbeatFlagPlugin
Expanded class hierarchy of HeartbeatFlagPlugin
File
- modules/
heartbeat_plugins/ includes/ heartbeatflagplugin.inc, line 49 - Heartbeat Flag Base Plugin and some required utility functions.
View source
class HeartbeatFlagPlugin extends HeartbeatBasePlugin {
/**
* hasFlagDefinitions().
* Defines if the plugin hasFlagDefinitions.
*/
public function hasFlagDefinitions() {
return TRUE;
}
/**
* flagDefinitions().
* Defines the flag definition.
*/
public function flagDefinitions() {
return array();
}
/**
* hasDefaultFlags().
* Defines if the plugin has default flags.
*/
public function hasDefaultFlags() {
return TRUE;
}
/**
* flagDefaults().
* Defines the default flags.
*/
public function flagDefaults() {
return array();
}
/**
* removeFlagContent().
*/
public function removeFlagContent($activityId) {
db_delete('flag_content')
->condition('content_type', 'heartbeat_activity')
->condition('content_id', $activityId)
->execute();
}
/**
* activityRemoved()
*/
public function activityRemoved($uaids, $all) {
foreach (array(
'flag_content',
'flag_counts',
) as $table) {
$query = db_delete($table);
$query
->condition('content_type', 'heartbeat_activity');
if (!empty($uaids) && $all == FALSE) {
$query
->condition('content_id', $uaids, 'IN');
}
$query
->execute();
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HeartbeatBasePlugin:: |
protected | property | ||
HeartbeatBasePlugin:: |
protected | property | ||
HeartbeatBasePlugin:: |
protected | property | ||
HeartbeatBasePlugin:: |
public | function | addSettings(). | |
HeartbeatBasePlugin:: |
public | function | getAttachments(). | 2 |
HeartbeatBasePlugin:: |
public | function | getLabel(). | |
HeartbeatBasePlugin:: |
public | function | getMenuItems(). | 1 |
HeartbeatBasePlugin:: |
public | function | getSettings(). | |
HeartbeatBasePlugin:: |
public | function | pluginAttachmentForm(). The form to add attachments to templates. | 2 |
HeartbeatBasePlugin:: |
public | function | pluginStreamForm(). | 2 |
HeartbeatBasePlugin:: |
public | function | pluginUIForm(). | 2 |
HeartbeatBasePlugin:: |
public | function | setLabel(). | |
HeartbeatBasePlugin:: |
final public | function | setStream(). | |
HeartbeatBasePlugin:: |
public | function | __construct(). | 1 |
HeartbeatFlagPlugin:: |
public | function |
activityRemoved() Overrides HeartbeatBasePlugin:: |
|
HeartbeatFlagPlugin:: |
public | function | flagDefaults(). Defines the default flags. | 1 |
HeartbeatFlagPlugin:: |
public | function | flagDefinitions(). Defines the flag definition. | 1 |
HeartbeatFlagPlugin:: |
public | function | hasDefaultFlags(). Defines if the plugin has default flags. | |
HeartbeatFlagPlugin:: |
public | function | hasFlagDefinitions(). Defines if the plugin hasFlagDefinitions. | |
HeartbeatFlagPlugin:: |
public | function | removeFlagContent(). |