Révision d50a36e0
Ajouté par Assos Assos il y a presque 4 ans
drupal7/sites/all/modules/fivestar/fivestar.api.php | ||
---|---|---|
5 | 5 |
* Provides API documentation for the fivestar module. |
6 | 6 |
*/ |
7 | 7 |
|
8 |
|
|
9 | 8 |
/** |
10 |
* Implementation of hook_fivestar_widgets().
|
|
9 |
* Implements hook_fivestar_widgets().
|
|
11 | 10 |
* |
12 | 11 |
* This hook allows other modules to create additional custom widgets for |
13 | 12 |
* the fivestar module. |
... | ... | |
30 | 29 |
} |
31 | 30 |
|
32 | 31 |
/** |
33 |
* Implementation of hook_fivestar_access().
|
|
32 |
* Implements hook_fivestar_access().
|
|
34 | 33 |
* |
35 | 34 |
* This hook is called before every vote is cast through Fivestar. It allows |
36 |
* modules to allow or deny voting on any type of entity, such as nodes, users, or
|
|
37 |
* comments. |
|
35 |
* modules to allow or deny voting on any type of entity, such as nodes, users, |
|
36 |
* or comments.
|
|
38 | 37 |
* |
39 | 38 |
* @param $entity_type |
40 | 39 |
* Type entity. |
... | ... | |
45 | 44 |
* @param $uid |
46 | 45 |
* The user ID trying to cast the vote. |
47 | 46 |
* |
48 |
* @return boolean or NULL
|
|
47 |
* @return bool|null
|
|
49 | 48 |
* Returns TRUE if voting is supported on this object. |
50 | 49 |
* Returns NULL if voting is not supported on this object by this module. |
51 | 50 |
* If needing to absolutely deny all voting on this object, regardless |
... | ... | |
63 | 62 |
} |
64 | 63 |
|
65 | 64 |
/** |
66 |
* Implementation of hook_fivestar_target_info().
|
|
65 |
* Implements hook_fivestar_target_info().
|
|
67 | 66 |
* |
68 | 67 |
* @param $field |
69 | 68 |
* The field structure for the operation. |
... | ... | |
71 | 70 |
* The instance structures for the $field. |
72 | 71 |
* |
73 | 72 |
* @return array |
74 |
* An array of key => value pairs. Each key must be unique the identifier for this |
|
75 |
* target selection. The Value is an array of key => value pairs for a title and a |
|
76 |
* callback function. The title value is used for displaying in the #options array |
|
77 |
* of the target selection option. The callback function is used when trying to decided |
|
78 |
* which target the current vote should be cast against. |
|
73 |
* An array of key => value pairs. Each key must be unique the identifier for |
|
74 |
* this target selection. The Value is an array of key => value pairs for a |
|
75 |
* title and a callback function. The title value is used for displaying in |
|
76 |
* the #options array of the target selection option. The callback function |
|
77 |
* is used when trying to decided which target the current vote should be |
|
78 |
* cast against. |
|
79 | 79 |
* |
80 | 80 |
* @see fivestar_get_targets() |
81 | 81 |
* @see fivestar_fivestar_target_info() |
... | ... | |
90 | 90 |
// node's author instead of the actual node. |
91 | 91 |
'example_node_author' => array( |
92 | 92 |
'title' => t('Node Author'), |
93 |
'callback' => '_example_target_node_author' |
|
93 |
'callback' => '_example_target_node_author',
|
|
94 | 94 |
), |
95 | 95 |
); |
96 | 96 |
|
... | ... | |
112 | 112 |
* The language associated with $items. |
113 | 113 |
* |
114 | 114 |
* @return array |
115 |
* An array of key => value pairs. The return array must contain an entity_id key
|
|
116 |
* and a entity_type key. The value os the entity_id and entity_type is what the
|
|
117 |
* fivestar vote is going to be cast against when a user has selected this option
|
|
118 |
* as the target selection. |
|
115 |
* An array of key => value pairs. The return array must contain an entity_id |
|
116 |
* key and a entity_type key. The value os the entity_id and entity_type is
|
|
117 |
* what the fivestar vote is going to be cast against when a user has selected
|
|
118 |
* this option as the target selection.
|
|
119 | 119 |
* |
120 | 120 |
* @see _fivestar_target_comment_parent_node() |
121 | 121 |
* @see _fivestar_target_node_reference() |
Formats disponibles : Unified diff
Weekly update of contrib modules