You are here

function twitter_block_block_get in Twitter Block 7

Same name and namespace in other branches
  1. 7.2 twitter_block.module \twitter_block_block_get()

Returns information from database about a user-created (Twitter) block.

Parameters

$bid: ID of the block to get information for.

Return value

Associative array of information stored in the database for this block. Array keys:

  • bid: Block ID.
  • info: Block description.
  • search_type: Type of search to perform.
  • include_rts: Whether to include retweets.
  • search_string: String to search for.
  • results_per_page: Number of tweets to display.
  • lang: Language to restrict tweets to.
3 calls to twitter_block_block_get()
twitter_block_block_configure in ./twitter_block.module
Implements hook_block_configure().
twitter_block_block_view in ./twitter_block.module
Implements hook_block_view().
twitter_block_delete in ./twitter_block.admin.inc
Form constructor for the custom Twitter block deletion form.

File

./twitter_block.module, line 101
A module to provide simple Twitter blocks using the Twitter Search API.

Code

function twitter_block_block_get($bid) {
  return db_query("SELECT * FROM {twitter_block} WHERE bid = :bid", array(
    ':bid' => $bid,
  ))
    ->fetchAssoc();
}