/[drupal]/contributions/modules/flexifilter/API.txt
ViewVC logotype

Diff of /contributions/modules/flexifilter/API.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4, Fri Feb 29 22:11:51 2008 UTC revision 1.4.6.1, Tue Jun 17 03:10:36 2008 UTC
# Line 1  Line 1 
1  // $Id: API.txt,v 1.3 2008/01/24 01:57:10 cwgordon7 Exp $  // $Id: API.txt,v 1.4 2008/02/29 22:11:51 cwgordon7 Exp $
2    
3  There are three major hooks to implement, hook_flexifilters, hook_flexifilter_conditions, and hook_flexifilter_components. Hook_flexifilters is for defining default flexifilters; hook_flexifilter_conditions is for describing your module's conditions to flexifilter; hook_flexifilter_components is for describing your module's components to flexifilter.  There are three major hooks to implement, hook_flexifilters, hook_flexifilter_conditions, and hook_flexifilter_components. Hook_flexifilters is for defining default flexifilters; hook_flexifilter_conditions is for describing your module's conditions to flexifilter; hook_flexifilter_components is for describing your module's components to flexifilter.
4    
   
   
   
5  For hook_flexifilters, an array should be returned, each value of the array corresponding to an exported flexifilter (as an array itself).  For hook_flexifilters, an array should be returned, each value of the array corresponding to an exported flexifilter (as an array itself).
6    
7    <?php
8  function hook_flexifilter() {  function hook_flexifilter() {
9    return array(    return array(
10      array(      array(
# Line 17  function hook_flexifilter() { Line 15  function hook_flexifilter() {
15      ),      ),
16    );    );
17  }  }
18    ?>
   
   
19    
20  A description of hook_flexifilter_components:  A description of hook_flexifilter_components:
21    
# Line 46  Hook_flexifilter_conditions works in a s Line 42  Hook_flexifilter_conditions works in a s
42    
43   - It has no 'step' attribute.   - It has no 'step' attribute.
44    
   
   
   
45  Two examples of a function specified in the 'callback' key follows:  Two examples of a function specified in the 'callback' key follows:
46    
47    <?php
48  function flexifilter_component_foo($op, $settings, $text) {  function flexifilter_component_foo($op, $settings, $text) {
49    switch ($op) {    switch ($op) {
50      case 'settings':      case 'settings':
# Line 87  function flexifilter_condition_foo($op, Line 81  function flexifilter_condition_foo($op,
81        return FALSE;        return FALSE;
82    }    }
83  }  }
84    ?>
   
85    
86  Some useful API functions follow:  Some useful API functions follow:
87    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.6.1

  ViewVC Help
Powered by ViewVC 1.1.2