5 * Test requirements for installation and running.
7 function panels_requirements($phase) {
8 $function = "panels_requirements_$phase";
9 return function_exists($function) ?
$function() : array();
13 * Check install-time requirements.
15 function panels_requirements_install() {
16 $requirements = array();
18 // Assume that if the user is running an installation profile that both
19 // Panels and CTools are the same release.
20 if (!(defined('MAINTENANCE_MODE') && MAINTENANCE_MODE
== 'install')) {
21 // apparently the install process doesn't include .module files,
22 // so we need to force the issue in order for our versioning
24 if (!defined('PANELS_REQUIRED_CTOOLS_API')) {
25 include_once
drupal_get_path('module', 'panels') .
'/panels.module';
28 // In theory we should check module_exists, but Drupal's gating should
29 // actually prevent us from getting here otherwise.
30 if (!defined('CTOOLS_API_VERSION')) {
31 include_once
drupal_get_path('module', 'ctools') .
'/ctools.module';
33 if (!module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API
)) {
34 $requirements['panels_ctools'] = array(
35 'title' => $t('CTools API Version'),
36 'value' => CTOOLS_API_VERSION
,
37 'severity' => REQUIREMENT_ERROR
,
38 'description' => t('The CTools API version is too old for Panels. Panels needs at least %version.', array('%version' => PANELS_REQUIRED_CTOOLS_API
))
46 * Implementation of hook_schema().
48 function panels_schema() {
49 // This should always point to our 'current' schema. This makes it relatively easy
50 // to keep a record of schema as we make changes to it.
51 return panels_schema_3();
55 * Schema from the D6 version.
57 function panels_schema_3() {
58 // Schema 3 is now locked. If you need to make changes, please create
59 // schema 4 and add them.
62 $schema['panels_display'] = array(
64 'object' => 'panels_display',
65 'bulk export' => FALSE
,
66 'export callback' => 'panels_export_display',
67 'can disable' => FALSE
,
68 'identifier' => 'display',
81 'layout_settings' => array(
85 'object default' => array(),
86 'initial ' => array(),
88 'panel_settings' => array(
92 'object default' => array(),
93 'initial ' => array(),
98 'object default' => array(),
99 'initial ' => array(),
106 'hide_title' => array(
112 'title_pane' => array(
118 'primary key' => array('did'),
121 $schema['panels_pane'] = array(
123 'can disable' => FALSE
,
124 'identifier' => 'pane',
125 'bulk export' => FALSE
,
162 'object default' => array(),
163 'initial ' => array(),
165 'configuration' => array(
169 'object default' => array(),
170 'initial ' => array(),
176 'object default' => array(),
177 'initial ' => array(),
183 'object default' => array(),
184 'initial ' => array(),
190 'object default' => array(),
191 'initial ' => array(),
197 'object default' => array(),
198 'initial ' => array(),
206 'primary key' => array('pid'),
208 'did_idx' => array('did')
212 $schema['panels_renderer_pipeline'] = array(
213 'description' => 'Contains renderer pipelines for Panels. Each pipeline contains one or more renderers and access rules to select which renderer gets used.',
215 'identifier' => 'pipeline',
216 'bulk export' => TRUE
,
217 'primary key' => 'rpid',
220 'api' => 'pipelines',
221 'minimum_version' => 1,
222 'current_version' => 1,
228 'description' => 'A database primary key to ensure uniqueness.',
235 'description' => 'Unique ID for this content. Used to identify it programmatically.',
237 'admin_title' => array(
240 'description' => 'Administrative title for this pipeline.',
242 'admin_description' => array(
245 'description' => 'Administrative description for this pipeline.',
246 'object default' => '',
256 'description' => 'Serialized settings for the actual pipeline. The contents of this field are up to the plugin that uses it.',
258 'object default' => array(),
261 'primary key' => array('rpid'),
264 $schema['panels_layout'] = array(
265 'description' => 'Contains exportable customized layouts for this site.',
267 'identifier' => 'layout',
268 'bulk export' => TRUE
,
269 'primary key' => 'lid',
273 'minimum_version' => 1,
274 'current_version' => 1,
280 'description' => 'A database primary key to ensure uniqueness.',
287 'description' => 'Unique ID for this content. Used to identify it programmatically.',
289 'admin_title' => array(
292 'description' => 'Administrative title for this layout.',
294 'admin_description' => array(
297 'description' => 'Administrative description for this layout.',
298 'object default' => '',
303 'description' => 'Administrative category for this layout.',
308 'description' => 'The layout plugin that owns this layout.',
313 'description' => 'Serialized settings for the actual layout. The contents of this field are up to the plugin that uses it.',
315 'object default' => array(),
318 'primary key' => array('lid'),