Révision 7e72b748
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ctools/includes/content.menu.inc | ||
---|---|---|
62 | 62 |
} |
63 | 63 |
} |
64 | 64 |
|
65 |
/* |
|
66 |
* Use well known/tested entity reference code to build our search query |
|
67 |
* From EntityReference_SelectionHandler_Generic class |
|
65 |
/** |
|
66 |
* Use EntityReference_SelectionHandler_Generic class to build our search query. |
|
68 | 67 |
*/ |
69 | 68 |
function _ctools_buildQuery($entity_type, $entity_info, $match = NULL, $match_operator = 'CONTAINS') { |
70 | 69 |
$base_table = $entity_info['base table']; |
... | ... | |
125 | 124 |
global $user; |
126 | 125 |
$account = $user; |
127 | 126 |
$options = array(); |
128 |
// We're an entity ID, return the id |
|
127 |
// We're an entity ID, return the id.
|
|
129 | 128 |
if (is_numeric($match) && $match_operator == '=') { |
130 | 129 |
if ($entity = array_shift(entity_load($entity_type, array($match)))) { |
131 | 130 |
if (isset($entity_info['access callback']) && function_exists($entity_info['access callback'])) { |
... | ... | |
143 | 142 |
// If you don't have access, or an access callback or a valid entity, just |
144 | 143 |
// Return back the Entity ID. |
145 | 144 |
return array( |
146 |
$match => array(
|
|
145 |
$match => array( |
|
147 | 146 |
'label' => $match, |
148 | 147 |
'bundle' => NULL, |
149 |
),
|
|
148 |
), |
|
150 | 149 |
); |
151 | 150 |
} |
152 | 151 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules