You are here

function lightgallery_style_plugin::validate in Lightgallery 7

Validate that the plugin is correct and can be saved.

Return value

array An array of error strings to tell the user what is wrong with this plugin.

Overrides views_plugin_style::validate

File

views/lightgallery_style_plugin.inc, line 336
Contains the lightgallery style plugin.

Class

lightgallery_style_plugin
Style plugin to render views as lightgallery instance.

Code

function validate() {
  parent::validate();
  $errors = array();

  // Make sure the pager is not enabled.
  if ($this->display->handler
    ->use_pager()) {
    $errors[] = t('The Lighgallery style cannot be used with a pager. Please disable the "Use pager" option for this display.');
  }
  return $errors;
}