You are here

function image_handler_argument_image_node_image_size::validate 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::validate()

Check that the image node image field is present.

File

views/image_handler_argument_image_node_image_size.inc, line 83
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 validate() {

  // @todo This will not catch cases involving defaulted handlers.
  //   For example, it is possible to add a display which inherits this
  //   argument, but overrides its fields.
  // @see <http://drupal.org/node/544098>
  if (!isset($this->view->display_handler->handlers['field']['image_image'])) {
    $errors[] = t('The @argument argument requires the "Image: Image" field.', array(
      '@argument' => $this->definition['title'],
    ));
  }
  return $errors;
}