You are here

function embed_views_plugin_display_embed::embed_views_exposed_form in Embed Views Display 7.2

Helper function to allow for easier exposed form embeds.

Return value

mixed Returns the rendered exposed form or FALSE if it could not be rendered.

File

./embed_views_plugin_display_embed.inc, line 100
Contains the embed display plugin.

Class

embed_views_plugin_display_embed
A plugin to create an embed display.

Code

function embed_views_exposed_form() {
  if (!$this
    ->get_option('exposed_embed')) {
    return FALSE;
  }

  // Allows for the exposed form to be rendered.
  $this->embed_exposed_form = TRUE;
  $this->view
    ->init_handlers();
  $exposed_form = $this
    ->get_plugin('exposed_form')
    ->render_exposed_form();

  // Set this back incase we are embedding and then rendering the form.
  // Otherwise, the form would render with the view.
  $this->embed_exposed_form = FALSE;
  return $exposed_form;
}