You are here

function front_page_get_by_rid in Front Page 8

Same name and namespace in other branches
  1. 6.2 front_page.module \front_page_get_by_rid()
  2. 7.2 front_page.module \front_page_get_by_rid()
  3. 9.1.x front_page.module \front_page_get_by_rid()

Function to return the first role enabled in front page, ordered by weight.

File

./front_page.module, line 75
This module allows the site admin to set advanced front page settings.

Code

function front_page_get_by_rid($rid) {
  $result = Database::getConnection()
    ->select('front_page', 'fp')
    ->fields('fp')
    ->condition('rid', $rid)
    ->condition('mode', '', '<>')
    ->execute()
    ->fetchAssoc();
  return $result;
}