You are here

function weight_views_tables in Weight 5

File

./weight.views.inc, line 2

Code

function weight_views_tables() {
  $tables['node_by_weight'] = array(
    'name' => 'node',
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid',
      ),
      'right' => array(
        'field' => 'nid',
      ),
    ),
    'filters' => array(
      'sticky' => array(
        'name' => t('Weight: Sticky'),
        'operator' => array(
          '>' => t('Yes'),
          '<=' => t('No'),
        ),
        'value' => array(
          '#type' => 'value',
          '#value' => '0',
        ),
        'help' => t('Filter by whether or not the node is set sticky.') . ' ' . t('Use "Weight: Sticky" as a replacement for "Node: Sticky" when the weight module is enabled.'),
      ),
    ),
  );
  return $tables;
}