You are here

function answers_all_questions in Answers 7.4

Return all questions.

2 calls to answers_all_questions()
answers_lock_example_install in answers_lock_example/answers_lock_example.install
Implements hook_install().
answers_lock_example_uninstall in answers_lock_example/answers_lock_example.install
Implements hook_uninstall().

File

./answers.module, line 432
The Answers module.

Code

function answers_all_questions() {
  $query = new EntityFieldQuery();
  $entities = $query
    ->entityCondition('entity_type', 'node')
    ->entityCondition('bundle', 'answers_question')
    ->execute();
  return empty($entities) ? $entities : entity_load('node', array_keys($entities['node']));
}