Skip to content

Commit dd80d01

Browse files
committed
Updates to Drupal modules: ctools, features, webform_civicrm
1 parent 33e144f commit dd80d01

File tree

70 files changed

+4582
-1387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+4582
-1387
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
CONTENTS OF THIS FILE
2+
---------------------
3+
4+
* Introduction
5+
* Requirements
6+
* Recommended Modules
7+
* Installation
8+
* Configuration
9+
10+
11+
INTRODUCTION
12+
------------
13+
14+
The Chaos tool suite (ctools) module is primarily a set of APIs and tools to
15+
improve the developer experience. It also contains a module called the Page
16+
Manager whose job is to manage pages. In particular it manages panel pages, but
17+
as it grows it will be able to manage far more than just Panels.
18+
19+
The Chaos Tool Suite (ctools) is a series of tools that makes code readily
20+
available for developers and creates libraries for other modules to use. Modules
21+
that use ctools include Views and Panels.
22+
23+
End users will use ctools as underlying user interface libraries when operating
24+
Views and Panels modules and will not need to explore further (ctools is geared
25+
more toward developer usage). Developers will use the module differently and
26+
work more with the tools provided.
27+
28+
For the moment, it includes the following tools:
29+
30+
* Plugins -- tools to make it easy for modules to let other modules implement
31+
plugins from .inc files.
32+
* Exportables -- tools to make it easier for modules to have objects that live
33+
in database or live in code, such as 'default views'.
34+
* AJAX responder -- tools to make it easier for the server to handle AJAX
35+
requests and tell the client what to do with them.
36+
* Form tools -- tools to make it easier for forms to deal with AJAX.
37+
* Object caching -- tool to make it easier to edit an object across multiple
38+
page requests and cache the editing work.
39+
* Contexts -- the notion of wrapping objects in a unified wrapper and providing
40+
an API to create and accept these contexts as input.
41+
* Modal dialog -- tool to make it simple to put a form in a modal dialog.
42+
* Dependent -- a simple form widget to make form items appear and disappear
43+
based upon the selections in another item.
44+
* Content -- pluggable content types used as panes in Panels and other modules
45+
like Dashboard.
46+
* Form wizard -- an API to make multi-step forms much easier.
47+
* CSS tools -- tools to cache and sanitize CSS easily to make user-input CSS
48+
safe.
49+
50+
* For a full description of the module visit:
51+
https://www.drupal.org/project/ctools
52+
53+
* To submit bug reports and feature suggestions, or to track changes visit:
54+
https://www.drupal.org/project/issues/ctools
55+
56+
57+
REQUIREMENTS
58+
------------
59+
60+
This module requires no modules outside of Drupal core.
61+
62+
63+
RECOMMENDED MODULES
64+
-------------------
65+
66+
The Advanced help module provides extended documentation. Once enabled,
67+
navigate to Administration > Advanced Help and select the Chaos tools link to
68+
view documentation.
69+
70+
* Advanced help - https://www.drupal.org/project/advanced_help
71+
72+
73+
INSTALLATION
74+
------------
75+
76+
* Install the Chaos tool suite module as you would normally install a
77+
contributed Drupal module. Visit https://www.drupal.org/node/895232 for
78+
further information.

profiles/civicrm_starterkit/modules/contrib/ctools/bulk_export/bulk_export.info

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ core = 7.x
44
dependencies[] = ctools
55
package = Chaos tool suite
66

7-
; Information added by Drupal.org packaging script on 2019-02-08
8-
version = "7.x-1.15"
7+
; Information added by Drupal.org packaging script on 2020-10-23
8+
version = "7.x-1.17"
99
core = "7.x"
1010
project = "ctools"
11-
datestamp = "1549603691"
11+
datestamp = "1603490551"

profiles/civicrm_starterkit/modules/contrib/ctools/ctools.api.php

+49-22
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ function hook_ctools_plugin_type() {
3030
}
3131

3232
/**
33+
* Tells CTools where to find module-defined plugins.
34+
*
3335
* This hook is used to inform the CTools plugin system about the location of a
3436
* directory that should be searched for files containing plugins of a
3537
* particular type. CTools invokes this same hook for all plugins, using the
@@ -104,12 +106,12 @@ function hook_ctools_plugin_directory($owner, $plugin_type) {
104106
* This hook is useful for altering flags or other information that will be
105107
* used or possibly overriden by the process hook if defined.
106108
*
107-
* @param $plugin
109+
* @param array $plugin
108110
* An associative array defining a plugin.
109-
* @param $info
111+
* @param array $info
110112
* An associative array of plugin type info.
111113
*/
112-
function hook_ctools_plugin_pre_alter(&$plugin, &$info) {
114+
function hook_ctools_plugin_pre_alter(array &$plugin, array &$info) {
113115
// Override a function defined by the plugin.
114116
if ($info['type'] == 'my_type') {
115117
$plugin['my_flag'] = 'new_value';
@@ -122,12 +124,12 @@ function hook_ctools_plugin_pre_alter(&$plugin, &$info) {
122124
* This hook is useful for overriding the final values for a plugin after it
123125
* has been processed.
124126
*
125-
* @param $plugin
127+
* @param array $plugin
126128
* An associative array defining a plugin.
127-
* @param $info
129+
* @param array $info
128130
* An associative array of plugin type info.
129131
*/
130-
function hook_ctools_plugin_post_alter(&$plugin, &$info) {
132+
function hook_ctools_plugin_post_alter(array &$plugin, array &$info) {
131133
// Override a function defined by the plugin.
132134
if ($info['type'] == 'my_type') {
133135
$plugin['my_function'] = 'new_function';
@@ -144,46 +146,71 @@ function hook_ctools_plugin_post_alter(&$plugin, &$info) {
144146
* An array of informations about the implementors of a certain api.
145147
* The key of this array are the module names/theme names.
146148
*/
147-
function hook_ctools_api_hook_alter(&$list) {
149+
function hook_ctools_api_hook_alter(array &$list) {
148150
// Alter the path of the node implementation.
149151
$list['node']['path'] = drupal_get_path('module', 'node');
150152
}
151153

152154
/**
153155
* Alter the available functions to be used in ctools math expression api.
154156
*
155-
* One usecase would be to create your own function in your module and
157+
* One use case would be to create your own function in your module and
156158
* allow to use it in the math expression api.
157159
*
158-
* @param $functions
160+
* @param array $functions
159161
* An array which has the functions as value.
162+
* @param array $context
163+
* An array containing an item 'final' whose value is a reference to the
164+
* definitions for multiple-arg functions. Use this to add in functions that
165+
* require more than one arg.
160166
*/
161-
function hook_ctools_math_expression_functions_alter(&$functions) {
162-
// Allow to convert from degrees to radiant.
167+
function hook_ctools_math_expression_functions_alter(array &$functions, array $context) {
168+
// Allow to convert from degrees to radians.
163169
$functions[] = 'deg2rad';
170+
171+
$multiarg = $context['final'];
172+
$multiarg['pow'] = array(
173+
'function' => 'pow',
174+
'arguments' => 2,
175+
);
176+
}
177+
178+
/**
179+
* Alter the available functions to be used in ctools math expression api.
180+
*
181+
* One usecase would be to create your own function in your module and
182+
* allow to use it in the math expression api.
183+
*
184+
* @param array $constants
185+
* An array of name:value pairs, one for each named constant. Values added
186+
* to this array become read-only variables with the value assigned here.
187+
*/
188+
function hook_ctools_math_expression_constants_alter(array &$constants) {
189+
// Add the speed of light as constant 'c':
190+
$constants['c'] = 299792458;
164191
}
165192

166193
/**
167194
* Alter everything.
168195
*
169-
* @param $info
196+
* @param array $info
170197
* An associative array containing the following keys:
171198
* - content: The rendered content.
172199
* - title: The content's title.
173200
* - no_blocks: A boolean to decide if blocks should be displayed.
174-
* @param $page
201+
* @param bool $page
175202
* If TRUE then this renderer owns the page and can use theme('page')
176203
* for no blocks; if false, output is returned regardless of any no
177204
* blocks settings.
178-
* @param $context
205+
* @param array $context
179206
* An associative array containing the following keys:
180207
* - args: The raw arguments behind the contexts.
181208
* - contexts: The context objects in use.
182209
* - task: The task object in use.
183210
* - subtask: The subtask object in use.
184211
* - handler: The handler object in use.
185212
*/
186-
function hook_ctools_render_alter(&$info, &$page, &$context) {
213+
function hook_ctools_render_alter(array &$info, &$page, array &$context) {
187214
if ($context['handler']->name == 'my_handler') {
188215
ctools_add_css('my_module.theme', 'my_module');
189216
}
@@ -219,7 +246,7 @@ function hook_ctools_content_subtype_alter($subtype, $plugin) {
219246
* @param string $plugin_id
220247
* The plugin ID, in the format NAME:KEY.
221248
*/
222-
function hook_ctools_entity_context_alter(&$plugin, &$entity, $plugin_id) {
249+
function hook_ctools_entity_context_alter(array &$plugin, array &$entity, $plugin_id) {
223250
ctools_include('context');
224251
switch ($plugin_id) {
225252
case 'entity_id:taxonomy_term':
@@ -242,13 +269,13 @@ function hook_ctools_entity_context_alter(&$plugin, &$entity, $plugin_id) {
242269
* A string associated with the plugin type, identifying the operation.
243270
* @param string $value
244271
* The value being converted; this is the only return from the function.
245-
* @param $converter_options
272+
* @param array $converter_options
246273
* Array of key-value pairs to pass to a converter function from higher
247274
* levels.
248275
*
249276
* @see ctools_context_convert_context()
250277
*/
251-
function hook_ctools_context_converter_alter($context, $converter, &$value, $converter_options) {
278+
function hook_ctools_context_converter_alter(ctools_context $context, $converter, &$value, array $converter_options) {
252279
if ($converter === 'mystring') {
253280
$value = 'fixed';
254281
}
@@ -262,7 +289,7 @@ function hook_ctools_context_converter_alter($context, $converter, &$value, $con
262289
*
263290
* @see hook_ctools_entity_context_alter()
264291
*/
265-
function hook_ctools_entity_contexts_alter(&$plugins) {
292+
function hook_ctools_entity_contexts_alter(array &$plugins) {
266293
$plugins['entity_id:taxonomy_term']['no ui'] = TRUE;
267294
}
268295

@@ -274,7 +301,7 @@ function hook_ctools_entity_contexts_alter(&$plugins) {
274301
*
275302
* @see ctools_cleanstring()
276303
*/
277-
function hook_ctools_cleanstring_alter(&$settings) {
304+
function hook_ctools_cleanstring_alter(array &$settings) {
278305
// Convert all strings to lower case.
279306
$settings['lower case'] = TRUE;
280307
}
@@ -287,7 +314,7 @@ function hook_ctools_cleanstring_alter(&$settings) {
287314
*
288315
* @see ctools_cleanstring()
289316
*/
290-
function hook_ctools_cleanstring_CLEAN_ID_alter(&$settings) {
317+
function hook_ctools_cleanstring_CLEAN_ID_alter(array &$settings) {
291318
// Convert all strings to lower case.
292319
$settings['lower case'] = TRUE;
293320
}
@@ -304,7 +331,7 @@ function hook_ctools_cleanstring_CLEAN_ID_alter(&$settings) {
304331
*
305332
* @see ctools_context_handler_pre_render()
306333
*/
307-
function ctools_context_handler_pre_render($handler, $contexts, $args) {
334+
function ctools_context_handler_pre_render($handler, array $contexts, array $args) {
308335
$handler->conf['css_id'] = 'my-id';
309336
}
310337

profiles/civicrm_starterkit/modules/contrib/ctools/ctools.info

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ files[] = tests/object_cache.test
1919
files[] = tests/object_cache_unit.test
2020
files[] = tests/page_tokens.test
2121

22-
; Information added by Drupal.org packaging script on 2019-02-08
23-
version = "7.x-1.15"
22+
; Information added by Drupal.org packaging script on 2020-10-23
23+
version = "7.x-1.17"
2424
core = "7.x"
2525
project = "ctools"
26-
datestamp = "1549603691"
26+
datestamp = "1603490551"

profiles/civicrm_starterkit/modules/contrib/ctools/ctools.module

+3-2
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ function ctools_uuid_generate() {
479479
if (!module_exists('uuid')) {
480480
ctools_include('uuid');
481481

482-
$callback = drupal_static(__FUNCTION__);
482+
$callback = &drupal_static(__FUNCTION__);
483483

484484
if (empty($callback)) {
485485
if (function_exists('uuid_create') && !function_exists('uuid_make')) {
@@ -903,13 +903,14 @@ function ctools_process(&$variables, $hook) {
903903
*/
904904

905905
function ctools_access_menu($access) {
906+
$func_args = func_get_args();
906907
// Short circuit everything if there are no access tests.
907908
if (empty($access['plugins'])) {
908909
return TRUE;
909910
}
910911

911912
$contexts = array();
912-
foreach (func_get_args() as $arg) {
913+
foreach ($func_args as $arg) {
913914
if (is_object($arg) && get_class($arg) == 'ctools_context') {
914915
$contexts[$arg->id] = $arg;
915916
}

profiles/civicrm_starterkit/modules/contrib/ctools/ctools_access_ruleset/ctools_access_ruleset.info

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ core = 7.x
44
package = Chaos tool suite
55
dependencies[] = ctools
66

7-
; Information added by Drupal.org packaging script on 2019-02-08
8-
version = "7.x-1.15"
7+
; Information added by Drupal.org packaging script on 2020-10-23
8+
version = "7.x-1.17"
99
core = "7.x"
1010
project = "ctools"
11-
datestamp = "1549603691"
11+
datestamp = "1603490551"

profiles/civicrm_starterkit/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.info

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ package = Chaos tool suite
44
dependencies[] = ctools
55
core = 7.x
66

7-
; Information added by Drupal.org packaging script on 2019-02-08
8-
version = "7.x-1.15"
7+
; Information added by Drupal.org packaging script on 2020-10-23
8+
version = "7.x-1.17"
99
core = "7.x"
1010
project = "ctools"
11-
datestamp = "1549603691"
11+
datestamp = "1603490551"

profiles/civicrm_starterkit/modules/contrib/ctools/ctools_ajax_sample/ctools_ajax_sample.module

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function ctools_ajax_sample_page() {
187187
);
188188
}
189189

190-
$output .= theme('table', array('header' => $header, 'rows' => $rows, array('class' => array('ajax-sample-table'))));
190+
$output .= theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('ajax-sample-table'))));
191191

192192
// Show examples of ctools javascript widgets.
193193
$output .= '<h2>' . t('CTools Javascript Widgets') . '</h2>';

profiles/civicrm_starterkit/modules/contrib/ctools/ctools_custom_content/ctools_custom_content.info

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ core = 7.x
44
package = Chaos tool suite
55
dependencies[] = ctools
66

7-
; Information added by Drupal.org packaging script on 2019-02-08
8-
version = "7.x-1.15"
7+
; Information added by Drupal.org packaging script on 2020-10-23
8+
version = "7.x-1.17"
99
core = "7.x"
1010
project = "ctools"
11-
datestamp = "1549603691"
11+
datestamp = "1603490551"

profiles/civicrm_starterkit/modules/contrib/ctools/ctools_plugin_example/ctools_plugin_example.info

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ dependencies[] = page_manager
77
dependencies[] = advanced_help
88
core = 7.x
99

10-
; Information added by Drupal.org packaging script on 2019-02-08
11-
version = "7.x-1.15"
10+
; Information added by Drupal.org packaging script on 2020-10-23
11+
version = "7.x-1.17"
1212
core = "7.x"
1313
project = "ctools"
14-
datestamp = "1549603691"
14+
datestamp = "1603490551"

0 commit comments

Comments
 (0)