finder_element

  1. finder
    1. 6.x-1.x
    2. 7.x-1.x
Versions
6.x-1.x – 7.x-1.x &finder_element(&$finder, &$finder_element_id)

Get an element from a finder.

Finder stores it's elements in an indexed array, as well as tracking an array that maps finder element IDs to the index position. This can be awkward to use when dealing with a particular element's settings especially when the element variable needs to be a reference to an element in the finder variable. This function conveniently allows us to pull a finder element into a reference. If called by reference, for example, $element = &finder_element($finder, $finder_element_id); this function will return a reference to a finder element from the supplied finder as identified by the supplied finder element id, if not called by reference it will return a copy of the element.

Parameters

&$finder The finder object from which to get the element.

&$finder_element_id The ID of the finder element required.

Return value

The finder element, or reference to the finder element.

▾ 10 functions call finder_element()

finder_admin_element_delete in includes/finder.admin.inc
Admin finder delete page
finder_admin_element_edit in includes/finder.admin.inc
Admin finder element add/edit page. Must have a Finder object at this point.
finder_autocomplete_autocomplete in modules/finder_autocomplete/finder_autocomplete.module
Menu callback; get autocomplete suggestions.
finder_find_choices in ./finder.module
Postprocessing for returned finder_find options when mode is choices.
finder_find_query in ./finder.module
Build basic finder query arrays.
finder_node_finder_find in modules/finder_node/finder_node.module
Implements hook_finder_find().
finder_user_finder_find in modules/finder_user/finder_user.module
Implements hook_finder_find().
finder_views_finder_find in modules/finder_views/finder_views.module
Implements hook_finder_find().
finder_views_plugin_display_finder::query in modules/finder_views/includes/finder_views_plugin_display_finder.inc
theme_finder_views_results in modules/finder_views/finder_views.module
Theme the views finder results.

Code

./finder.module, line 1376

<?php
function &finder_element(&$finder, &$finder_element_id) {
  $key = &$finder->elements_index[$finder_element_id];
  return $finder->elements[$key];
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.