You are here

public function Popup_announcement_visitor::is_visible in Pop-up announcement 7

Check if announcement is visible for this visit.

Return value

int 1 - if for this visitor announcement can be created 0 - if not, for example because he made some action from these announcement yet

File

./popup_announcement.module, line 428
Primarily Drupal hooks and custom functions for creating block with pop-up announcement.

Class

Popup_announcement_visitor
Class for visitor

Code

public function is_visible() {
  return db_select('popup_announcement', 'a')
    ->condition('sid', $this->sid)
    ->fields('a', array(
    'is_visible',
  ))
    ->execute()
    ->fetchField();
}