class HeartbeatBasePlugin in Heartbeat 7
abstract class HeartbeatBasePlugin.
Hierarchy
- class \HeartbeatBasePlugin
Expanded class hierarchy of HeartbeatBasePlugin
File
- modules/
heartbeat_plugins/ includes/ heartbeat_plugin.inc, line 120
View source
class HeartbeatBasePlugin {
protected $label = '';
protected $settings = array();
protected $stream = NULL;
/**
* __construct().
*/
public function __construct($label, $settings) {
$this
->setLabel($label);
$this
->addSettings($settings);
}
/**
* setLabel().
*/
public function setLabel($label) {
$this->label = $label;
}
/**
* getLabel().
*/
public function getLabel() {
return $this->label;
}
/**
* setStream().
*/
public final function setStream(HeartbeatStream $heartbeatStream) {
$this->stream = $heartbeatStream;
}
/**
* addSettings().
*/
public function addSettings($settings) {
$this->settings += $settings;
}
/**
* getSettings().
*/
public function getSettings() {
return $this->settings;
}
/**
* getAttachments().
*
* @param $template
* The Heartbeat Template
* @param $component_type
* The type of attachment [buttons, content]
*/
public function getAttachments($template, $component_type) {
return array(
array(
'name' => $this->settings['plugin_name'],
'title' => $this->settings['plugin_name'],
'enabled' => isset($template->attachments[$component_type]['enabled'][$this->settings['plugin_name']]) ? $template->attachments[$component_type]['enabled'][$this->settings['plugin_name']] : 0,
'weight' => 5,
),
);
}
/**
* activityRemoved().
*/
public function activityRemoved($uaids, $all) {
}
/**
* getMenuItems().
*/
public function getMenuItems() {
return array();
}
/**
* pluginUIForm().
*/
public function pluginUIForm(&$form, &$form_state) {
}
/**
* pluginAttachmentForm().
* The form to add attachments to templates.
*/
public function pluginAttachmentForm(&$form, $form_values, $component_type) {
}
/**
* pluginStreamForm().
*/
public function pluginStreamForm(&$form, &$form_state) {
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HeartbeatBasePlugin:: |
protected | property | ||
HeartbeatBasePlugin:: |
protected | property | ||
HeartbeatBasePlugin:: |
protected | property | ||
HeartbeatBasePlugin:: |
public | function | activityRemoved(). | 1 |
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 |