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

Drupal example source code file (image_handler_filter_image_size.inc)

This example Drupal source code file (image_handler_filter_image_size.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

array, as, extends, foreach, function, get_value_options, if, image_get_sizes, image_handler_filter_image_size, isset, key, options, php, views_handler_filter_in_operator

The image_handler_filter_image_size.inc Drupal example source code

<?php
// $Id: image_handler_filter_image_size.inc,v 1.1 2009/05/01 22:29:47 sun Exp $

/**
 * @file
 * Views handler for image size filter.
 */

/**
 * Filter by image size.
 */
class image_handler_filter_image_size extends views_handler_filter_in_operator {
  function get_value_options() {
    if (!isset($this->value_options)) {
      foreach (image_get_sizes() as $key => $size) {
        $options[$key] = $size['label'];
      }
      $this->value_options = $options;
    }
  }
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal image_handler_filter_image_size.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.