home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (views_handler_filter_node_status.inc)

This example Drupal source code file (views_handler_filter_node_status.inc) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

administer_nodes, and, array, current_user, extends, form, form_state, formula, function, or, php, query, view_own_unpublished_nodes

The views_handler_filter_node_status.inc Drupal example source code

// $Id: views_handler_filter_node_status.inc,v 2010/11/18 00:43:18 merlinofchaos Exp $
 * Filter by published status
class views_handler_filter_node_status extends views_handler_filter {
  function admin_summary() { }
  function operator_form(&$form, &$form_state) { }

  function query() {
    $table = $this->ensure_my_table();
    $this->query->add_where($this->options['group'], "$table.status = 1 OR ($table.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0 AND ***VIEW_OWN_UNPUBLISHED_NODES*** = 1) OR ***ADMINISTER_NODES*** = 1", array(), 'formula');

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal views_handler_filter_node_status.inc source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.