Files | |
| file | structSearch/settings.php |
Settings for the structBrowse module. | |
| file | structSearch.module |
The conStruct Search module file. | |
Functions | |
| structSearch_main () | |
| Main Drupal hook procedure. | |
| structSearch_access ($op, $node, $account) | |
| Define access restrictions. | |
| structSearch_access_callback () | |
| Access callback for the structSearch_main() page. | |
| structSearch_block ($op= 'list', $delta=0, $edit=array()) | |
| Declare a block or set of blocks. | |
| structSearch_contents ($which_block) | |
| Display the conStruct side-bar menu items. | |
| structSearch_menu () | |
| Define menu items and page callbacks. | |
| structSearch_perm () | |
| Define user permissions. | |
| conStruct_search ($baseLinksUrl, $showFilters) | |
| Entry point of the "Search Tool". | |
| generateClassHierarchyHtmlTreeSearch ($classHierarchy, $counts, $dataset, $attribute, $type, $page, $ignores) | |
| Generate a HTML tree out of a taxonomic structure. | |
| generateClassHierarchyHtmlTreeSearchRecur ($class, $counts, $dataset, $attribute, $type, $page, $ignores, $nb) | |
| Generate a HTML tree out of a taxonomic structure - Recursion part of the procedure. | |
Variables | |
| $filterKindsIgnore = array() | |
| $filterAttributesIgnore = array() | |
Function Documentation
| conStruct_search | ( | $ | baseLinksUrl, | |
| $ | showFilters | |||
| ) |
Entry point of the "Search Tool".
The Search tool is used to search for resources according to some keywords. The user can restrict the search query to a subset of resources of the system. This restriction happens on the "type" of a resource, as noted in the section above. In the example below, the search is for resources of type Person where the keyword "Jim" appears.
- Returns:
- a string containing the HTML page generated by the Search tool.
- Todo:
- the Search tool will be enhanced to further leverage the power of RDF by allowing more complex and complete search queries such as: give me the list of resources that are person, where its name is "Jim" and that has a picture.
- Todo:
- Finish to integrate the Datasets-Registry idea within conStruct
- Todo:
- Finish to integrate the Datasets-Registry idea within conStruct
Definition at line 324 of file structSearch.module.
References $addFromSkin, $base_url, $filterAttributesIgnore, $filterKindsIgnore, $userIP, $wsq, generateClassHierarchyHtmlTreeSearch(), get_domain(), get_uri_label(), and getResourceLabel().
Referenced by structSearch_main().

| generateClassHierarchyHtmlTreeSearch | ( | $ | classHierarchy, | |
| $ | counts, | |||
| $ | dataset, | |||
| $ | attribute, | |||
| $ | type, | |||
| $ | page, | |||
| $ | ignores | |||
| ) |
Generate a HTML tree out of a taxonomic structure.
- Parameters:
-
[in] $classHierarchy Class hierarchy of the taxonomic structure to display [in] $counts Counts array to display with the nodes of the tree [in] $dataset Datasets for creating the link to the browse page [in] $attribute Attributes for creating the link to the browse page [in] $type Types for creating the link to the browse page [in] $page Page for creating the link to the browse page [in] $ignores Array of types to ignores when we display theclass hierarchy to the user
Definition at line 1929 of file structSearch.module.
References generateClassHierarchyHtmlTreeSearchRecur().
Referenced by conStruct_search().

| generateClassHierarchyHtmlTreeSearchRecur | ( | $ | class, | |
| $ | counts, | |||
| $ | dataset, | |||
| $ | attribute, | |||
| $ | type, | |||
| $ | page, | |||
| $ | ignores, | |||
| $ | nb | |||
| ) |
Generate a HTML tree out of a taxonomic structure - Recursion part of the procedure.
- Parameters:
-
[in] $class Class node to display [in] $counts Counts array to display with the nodes of the tree [in] $dataset Datasets for creating the link to the browse page [in] $attribute Attributes for creating the link to the browse page [in] $type Types for creating the link to the browse page [in] $page Page for creating the link to the browse page [in] $ignores Array of types to ignores when we display theclass hierarchy to the user [in] $nb Number of items in the hierarchy
Definition at line 1968 of file structSearch.module.
References $base_url, and get_uri_label().
Referenced by generateClassHierarchyHtmlTreeSearch().

| structSearch_access | ( | $ | op, | |
| $ | node, | |||
| $ | account | |||
| ) |
Define access restrictions.
This hook allows node modules to limit access to the node types they define. The administrative account (user ID #1) always passes any access check, so this hook is not called in that case. If this hook is not defined for a node type, all access checks will fail, so only the administrator will be able to see content of that type. However, users with the "administer nodes" permission may always view and edit content through the administrative interface.
- Warning:
- The access hook is not yet implemented
- Parameters:
-
[in] $op The operation to be performed. Possible values: - "create"
- "delete"
- "update"
- "view
[in] $node The node on which the operation is to be performed, or, if it does not yet exist, the type of node to be created. [in] $account A user object representing the user for whom the operation is to be performed.
- Returns:
- TRUE if the operation is to be allowed; FALSE if the operation is to be denied; NULL to not override the settings in the node_access table, or access control modules.
- Todo:
- Implementing the access hook properly
Definition at line 77 of file structSearch.module.
| structSearch_access_callback | ( | ) |
Access callback for the structSearch_main() page.
- Warning:
- The access hook callback function is not yet implemented
- Returns:
- TRUE if the operation is to be allowed; FALSE if the operation is to be denied; NULL to not override the settings in the node_access table, or access control modules.
- Todo:
- Implementing the callback function for the access hook
Definition at line 99 of file structSearch.module.
| structSearch_block | ( | $ | op = 'list', |
|
| $ | delta = 0, |
|||
| $ | edit = array() | |||
| ) |
Declare a block or set of blocks.
Any module can create a block (or blocks) to be displayed by defining the _block hook. This hook is called by theme.inc to display a block, and also by block.module to procure the list of available blocks.
The functions mymodule_display_block_1 and 2, as used in the example, should of course be defined somewhere in your module and return the content you want to display to your users. If the "content" element is empty, no block will be displayed even if "subject" is present.
After completing your blocks, do not forget to enable them in the block admin menu.
- Parameters:
-
[in] $op What kind of information to retrieve about the block or blocks. Possible values: - 'list': A list of all blocks defined by the module.
- 'configure': Configuration form for the block.
- 'save': Save the configuration options.
- 'view': Process the block when enabled in a region in order to view its contents.
[in] $delta Which block to return (not applicable if $op is 'list'). Although it is most commonly an integer starting at 0, this is not mandatory. For instance, aggregator.module uses string values for $delta. [in] $edit If $op is 'save', the submitted form data from the configuration form.
- Returns:
- If $op is 'list': An array of block descriptions. Each block description is an associative array.
Definition at line 135 of file structSearch.module.
References $base_url, and structSearch_contents().

| structSearch_contents | ( | $ | which_block | ) |
Display the conStruct side-bar menu items.
This function is called to generate the HTML of the tool lists being displayed in the side-bar.
- Returns:
- A string where the HTML menus have been defined.
Definition at line 215 of file structSearch.module.
References $base_url.
Referenced by structSearch_block().
| structSearch_main | ( | ) |
Main Drupal hook procedure.
This hook is the first one called by Drupal when one of the module's page is accessed. We use this hook to:
- Get the URI that has been accessed by the user
- Trigger the conStruct tool related to this URI by calling its main procedure.
- Returns:
- A string containing the HTML page description generated by the conStruct tool
Definition at line 36 of file structSearch.module.
References $base_url, and conStruct_search().

| structSearch_menu | ( | ) |
Define menu items and page callbacks.
This hook enables modules to register paths, which determines whose requests are to be handled. Depending on the type of registration requested by each path, a link is placed in the the navigation block and/or an item appears in the menu administration page (q=admin/menu).
- Returns:
- An array of menu items. Each menu item has a key corresponding to the Drupal path being registered. The item is an associative array.
Definition at line 254 of file structSearch.module.
| structSearch_perm | ( | ) |
Define user permissions.
This hook can supply permissions that the module defines, so that they can be selected on the user permissions page and used to restrict access to actions the module performs.
The permissions in the array do not need to be wrapped with the function t(), since the string extractor takes care of extracting permission names defined in the perm hook for translation.
Permissions are checked using user_access().
- Note:
- Currently only two kind of users exist: (1) "access" and (2) "administer". However, we expect to have more kind of users in the future for different node maintenance purposes.
- Depending on the user (access or administer), some part of this create module will be available to the user.
- Once new permissions are created, the node administrator has to set their permissions in the setting panel of the node
- Returns:
- An array of permissions strings.
Definition at line 296 of file structSearch.module.
Variable Documentation
| $filterAttributesIgnore = array() |
Definition at line 16 of file structSearch/settings.php.
| $filterKindsIgnore = array() |
Definition at line 12 of file structSearch/settings.php.
