public function remote__data::instanceSettingsFormValidate

3.x remote__data.inc public remote__data::instanceSettingsFormValidate($form, &$form_state)

_state

Parameters

unknown $form:

Overrides TripalField::instanceSettingsFormValidate

File

tripal_ws/includes/TripalFields/remote__data/remote__data.inc, line 339

Class

remote__data
@class Purpose:

Code

public function instanceSettingsFormValidate($form, &$form_state) {
  $site_logo = $form_state['values']['instance']['settings']['data_info']['site_logo'];

  // If we have a site logo then add usage information.
  if ($site_logo) {
    $file = file_load($site_logo);
    $file_usage = file_usage_list($file);
    if (!array_key_exists('tripal_ws', $file_usage)) {
      file_usage_add($file, 'tripal_ws', 'site-logo', 1);
    }
  }
}