You are here

function globallink_menu_get_sent_rows_by_mlid in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink_menu/globallink_menu.inc \globallink_menu_get_sent_rows_by_mlid()
  2. 7.6 globallink_menu/globallink_menu.inc \globallink_menu_get_sent_rows_by_mlid()

Gets active menu submission rows by menu ID.

Parameters

string $mlid: The menu ID.

Return value

Associative array of menu active submission rows. FALSE if the array is empty.

1 call to globallink_menu_get_sent_rows_by_mlid()
globallink_menu_send_for_translations in globallink_menu/globallink_menu.inc
Sends menus for translation.

File

globallink_menu/globallink_menu.inc, line 451

Code

function globallink_menu_get_sent_rows_by_mlid($mlid) {
  $result = db_select('globallink_document', 'tc')
    ->fields('tc')
    ->condition('object_id', $mlid, '=')
    ->condition('entity_type', GLOBALLINK_ENTITY_TYPE_MENU, '=')
    ->condition('target_status', array(
    GLOBALLINK_STATUS_TRANSLATION_SENT,
    GLOBALLINK_STATUS_TRANSLATION_ERROR,
    GLOBALLINK_STATUS_TRANSLATION_COMPLETED,
  ), 'IN')
    ->execute();
  $rows = array();
  foreach ($result as $row) {
    $rows[] = $row;
  }
  return $rows;
}