You are here

weight.views.inc in Weight 5

Same filename and directory in other branches
  1. 8.3 weight.views.inc
  2. 7 weight.views.inc

File

weight.views.inc
View source
<?php

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;
}

Functions