You are here

function _views_send_get_field in Views Send 8

Gets the selector field if it exists on the passed-in view.

Return value

The field object if found. Otherwise, FALSE.

File

./views_send.module, line 66
The Views Send module.

Code

function _views_send_get_field($view) {
  foreach ($view->field as $field_name => $field) {
    if ($field instanceof ViewsSend) {

      // Add in the view object for convenience.
      $field->view = $view;
      return $field;
    }
  }
  return FALSE;
}