class ForumIndexStorage implements ForumIndexStorageInterface (View source)

Handles CRUD operations to {forum_index} table.

Properties

protected Connection $database

The active database connection.

Methods

__construct(Connection $database)

Constructs a ForumIndexStorage object.

int
getOriginalTermId(NodeInterface $node)

Returns the forum term id associated with an existing forum node.

create(NodeInterface $node)

Creates a record in {forum} table for the given node.

read(array $vids)

Reads an array of {forum} records for the given revision ids.

delete(NodeInterface $node)

Deletes the records in {forum} table for the given node.

deleteRevision(NodeInterface $node)

Deletes the records in {forum} table for a given node revision.

update(NodeInterface $node)

Updates the {forum} table for the given node.

updateIndex(NodeInterface $node)

Updates the {forum_index} records for a given node.

createIndex(NodeInterface $node)

Creates a {forum_index} entry for the given node.

deleteIndex(NodeInterface $node)

Deletes the {forum_index} records for a given node.

Details

__construct(Connection $database)

Constructs a ForumIndexStorage object.

Parameters

Connection $database

The current database connection.

int getOriginalTermId(NodeInterface $node)

Returns the forum term id associated with an existing forum node.

Parameters

NodeInterface $node

The existing forum node.

Return Value

int

The forum term id currently associated with the node.

create(NodeInterface $node)

Creates a record in {forum} table for the given node.

Parameters

NodeInterface $node

The node for which the record is to be created.

StatementInterface read(array $vids)

Reads an array of {forum} records for the given revision ids.

Parameters

array $vids

An array of node revision ids.

Return Value

StatementInterface

The records from {forum} for the given vids.

delete(NodeInterface $node)

Deletes the records in {forum} table for the given node.

Parameters

NodeInterface $node

The node for which the records are to be deleted.

deleteRevision(NodeInterface $node)

Deletes the records in {forum} table for a given node revision.

Parameters

NodeInterface $node

The node revision for which the records are to be deleted.

update(NodeInterface $node)

Updates the {forum} table for the given node.

Parameters

NodeInterface $node

The node for which the record is to be updated.

updateIndex(NodeInterface $node)

Updates the {forum_index} records for a given node.

Parameters

NodeInterface $node

The node for which the index records are to be updated.

createIndex(NodeInterface $node)

Creates a {forum_index} entry for the given node.

Parameters

NodeInterface $node

The node for which the index records are to be created.

deleteIndex(NodeInterface $node)

Deletes the {forum_index} records for a given node.

Parameters

NodeInterface $node

The node for which the index records are to be deleted.