class SingleActivity in Heartbeat 7
Concrete class SingleActivity Defines a stream for one activity message.
Hierarchy
- class \HeartbeatStream
- class \SingleActivity
Expanded class hierarchy of SingleActivity
File
- streams/
singleactivity.inc, line 12 - Defines a stream for one activity message.
View source
class SingleActivity extends HeartbeatStream {
/**
* hasAccess
*
* @param $text
* @return boolean to indicate the access to the stream
*/
public function hasAccess() {
return TRUE;
}
/**
* Override the createQuery method.
* @return HeartbeatParser object
*/
protected function createQuery() {
$this->query = db_select('heartbeat_activity', 'ha');
$this->query
->fields('ha');
// Override the permission based on the user profile status.
$this->query
->leftJoin('heartbeat_user_templates', 'hut', ' ha.uid = hut.uid AND ha.message_id = hut.message_id ');
$this->query
->addField('hut', 'status', 'access_status');
$this->query
->condition('ha.uaid', $this->latest_activity_id);
$this->query
->where(" ha.language IN (:languages) ", array(
':languages' => $this
->getCurrentLanguages(),
));
$this->config->variables['build_mode'] = 'full';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
public | property | ||
HeartbeatStream:: |
public | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
public | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
public | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
public | property | ||
HeartbeatStream:: |
public | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
protected | property | ||
HeartbeatStream:: |
public | function | addError | |
HeartbeatStream:: |
public | function | canPostActivityStatuses(). TODO Remove this here. The stream plugins should be stored in the stream object. This kind of access will become much easier to implement. | |
HeartbeatStream:: |
protected | function | Function to check access on messages This behaviour is set by a heartbeat message configuration to overrule the chosen display access type | |
HeartbeatStream:: |
public | function | Fake constructor to hook this method instead of the constructor. | 5 |
HeartbeatStream:: |
public | function | excludeOg(). | |
HeartbeatStream:: |
public | function | Function that reorganizes a query result of messages into a stream of heartbeat activity objects. | |
HeartbeatStream:: |
protected | function | executeQuery | |
HeartbeatStream:: |
public | function | executeViews(). | |
HeartbeatStream:: |
public | function | getAjax(). | |
HeartbeatStream:: |
public | function | getConfig(). | |
HeartbeatStream:: |
public | function | getCurrentLanguages(). | |
HeartbeatStream:: |
public | function | ||
HeartbeatStream:: |
public | function | getLatestActivityId() | |
HeartbeatStream:: |
public | function | Get the messages. | |
HeartbeatStream:: |
final public | function | getOffsetTime | |
HeartbeatStream:: |
final public | function | getTemplate(). | |
HeartbeatStream:: |
public | function | getViewed(). | |
HeartbeatStream:: |
public | function | getViewedId(). | |
HeartbeatStream:: |
public | function | getViewer(). | |
HeartbeatStream:: |
public | function | hasErrors | |
HeartbeatStream:: |
public | function | Function to check if more/older messages can be loaded | |
HeartbeatStream:: |
public | function | isAjax(). | |
HeartbeatStream:: |
public | function | isPage(). | |
HeartbeatStream:: |
public | function | modifyActivityMessage() | 4 |
HeartbeatStream:: |
public | function | needsModal(). Returns a boolean to indicate whether modal window is needed on the page. | |
HeartbeatStream:: |
public | function | numberOfMessages(). | |
HeartbeatStream:: |
public | function | Create the well-formed activity messages from a result. HeartbeatParser will do most of the work here. | |
HeartbeatStream:: |
protected | function | Alter the query object. | 8 |
HeartbeatStream:: |
public | function | Render(). | |
HeartbeatStream:: |
public | function | result Prepares a query, makes it available to alter it and finally executes it. | |
HeartbeatStream:: |
public | function | setAjax(). | |
HeartbeatStream:: |
protected | function | setAvailableTemplates() | |
HeartbeatStream:: |
public | function | setConfig(). | |
HeartbeatStream:: |
protected | function | setContextualArguments(). | |
HeartbeatStream:: |
protected | function | setError Alias for addError. | |
HeartbeatStream:: |
public | function | setIsPage(). | |
HeartbeatStream:: |
public | function | Set the maximum number of items to fetch. | |
HeartbeatStream:: |
public | function | setLanguage(). | |
HeartbeatStream:: |
public | function | setLatestActivityId(). | |
HeartbeatStream:: |
final public | function | setOffsetTime | |
HeartbeatStream:: |
public | function | setViewed(). | |
HeartbeatStream:: |
public | function | setViewer(). | |
HeartbeatStream:: |
public | function | setViewMode(). | |
HeartbeatStream:: |
public | function | skipActiveUser(). | |
HeartbeatStream:: |
constant | |||
HeartbeatStream:: |
constant | |||
HeartbeatStream:: |
public | function | viewsQueryAlter | 5 |
HeartbeatStream:: |
final public | function | Constructor | |
SingleActivity:: |
protected | function |
Override the createQuery method. Overrides HeartbeatStream:: |
|
SingleActivity:: |
public | function |
hasAccess Overrides HeartbeatStream:: |