You are here

function image_handler_argument_image_node_image_size::query in Image 6

Same name and namespace in other branches
  1. 7 views/image_handler_argument_image_node_image_size.inc \image_handler_argument_image_node_image_size::query()

Don't query, but change the image field's values instead.

@todo This only works with the image node field. For it to work on image attach fields too, the handler for that should probably be subclassed (so it uses the same option name for starters). This handler would need to look at all the fields and have a best stab at guessing which one to fiddle with. Remember to change validate() too!

File

views/image_handler_argument_image_node_image_size.inc, line 103
Provide an argument to set the image size of an Image node image field.

Class

image_handler_argument_image_node_image_size
@file

Code

function query() {
  $argument = $this->argument;

  // Checking here so we don't get nasty errors when validation doesn't work.
  // @see validate() for details.
  if (isset($this->view->field['image_image'])) {
    $this->view->field['image_image']->options['image_derivative'] = $argument;
  }
}