first import
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* popsu_pages.context.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_context_default_contexts().
|
||||
*/
|
||||
function popsu_pages_context_default_contexts() {
|
||||
$export = array();
|
||||
|
||||
$context = new stdClass();
|
||||
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
|
||||
$context->api_version = 3;
|
||||
$context->name = 'popsu-page-europe-node';
|
||||
$context->description = 'Contexte d\'un noeud de type Page pour POPSU Europe (feature)';
|
||||
$context->tag = 'pages-europe-feature';
|
||||
$context->conditions = array(
|
||||
'node' => array(
|
||||
'values' => array(
|
||||
'popsu_page' => 'popsu_page',
|
||||
),
|
||||
'options' => array(
|
||||
'node_form' => '0',
|
||||
),
|
||||
),
|
||||
'node_taxonomy' => array(
|
||||
'values' => array(
|
||||
3 => 3,
|
||||
),
|
||||
'options' => array(
|
||||
'node_form' => '1',
|
||||
),
|
||||
),
|
||||
);
|
||||
$context->reactions = array(
|
||||
'block' => array(
|
||||
'blocks' => array(
|
||||
'menu_block-6' => array(
|
||||
'module' => 'menu_block',
|
||||
'delta' => '6',
|
||||
'region' => 'sidebar_first',
|
||||
'weight' => '-10',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
$context->condition_mode = 1;
|
||||
|
||||
// Translatables
|
||||
// Included for use with string extractors like potx.
|
||||
t('Contexte d\'un noeud de type Page pour POPSU Europe (feature)');
|
||||
t('pages-europe-feature');
|
||||
$export['popsu-page-europe-node'] = $context;
|
||||
|
||||
$context = new stdClass();
|
||||
$context->disabled = FALSE; /* Edit this to true to make a default context disabled initially */
|
||||
$context->api_version = 3;
|
||||
$context->name = 'popsu-page-node';
|
||||
$context->description = 'Contexte d\'un noeud de type Page POPSU (feature)';
|
||||
$context->tag = 'pages-feature';
|
||||
$context->conditions = array(
|
||||
'node' => array(
|
||||
'values' => array(
|
||||
'popsu_page' => 'popsu_page',
|
||||
),
|
||||
'options' => array(
|
||||
'node_form' => '0',
|
||||
),
|
||||
),
|
||||
);
|
||||
$context->reactions = array(
|
||||
'block' => array(
|
||||
'blocks' => array(
|
||||
'menu_block-3' => array(
|
||||
'module' => 'menu_block',
|
||||
'delta' => '3',
|
||||
'region' => 'sidebar_first',
|
||||
'weight' => '-10',
|
||||
),
|
||||
'menu_block-4' => array(
|
||||
'module' => 'menu_block',
|
||||
'delta' => '4',
|
||||
'region' => 'sidebar_first',
|
||||
'weight' => '-10',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
$context->condition_mode = 0;
|
||||
|
||||
// Translatables
|
||||
// Included for use with string extractors like potx.
|
||||
t('Contexte d\'un noeud de type Page POPSU (feature)');
|
||||
t('pages-feature');
|
||||
$export['popsu-page-node'] = $context;
|
||||
|
||||
return $export;
|
||||
}
|
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* popsu_pages.features.field.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_field_default_fields().
|
||||
*/
|
||||
function popsu_pages_field_default_fields() {
|
||||
$fields = array();
|
||||
|
||||
// Exported field: 'node-popsu_page-field_popsu_page_body'.
|
||||
$fields['node-popsu_page-field_popsu_page_body'] = array(
|
||||
'field_config' => array(
|
||||
'active' => '1',
|
||||
'cardinality' => '1',
|
||||
'deleted' => '0',
|
||||
'entity_types' => array(),
|
||||
'field_name' => 'field_popsu_page_body',
|
||||
'foreign keys' => array(
|
||||
'format' => array(
|
||||
'columns' => array(
|
||||
'format' => 'format',
|
||||
),
|
||||
'table' => 'filter_format',
|
||||
),
|
||||
),
|
||||
'indexes' => array(
|
||||
'format' => array(
|
||||
0 => 'format',
|
||||
),
|
||||
),
|
||||
'locked' => '0',
|
||||
'module' => 'text',
|
||||
'settings' => array(),
|
||||
'translatable' => '0',
|
||||
'type' => 'text_with_summary',
|
||||
),
|
||||
'field_instance' => array(
|
||||
'bundle' => 'popsu_page',
|
||||
'default_value' => NULL,
|
||||
'deleted' => '0',
|
||||
'description' => '',
|
||||
'display' => array(
|
||||
'default' => array(
|
||||
'label' => 'above',
|
||||
'module' => 'text',
|
||||
'settings' => array(),
|
||||
'type' => 'text_default',
|
||||
'weight' => '0',
|
||||
),
|
||||
'teaser' => array(
|
||||
'label' => 'above',
|
||||
'settings' => array(),
|
||||
'type' => 'hidden',
|
||||
'weight' => 0,
|
||||
),
|
||||
),
|
||||
'entity_type' => 'node',
|
||||
'field_name' => 'field_popsu_page_body',
|
||||
'label' => 'Texte de la page',
|
||||
'required' => 0,
|
||||
'settings' => array(
|
||||
'display_summary' => 0,
|
||||
'text_processing' => '1',
|
||||
'user_register_form' => FALSE,
|
||||
),
|
||||
'widget' => array(
|
||||
'active' => 1,
|
||||
'module' => 'text',
|
||||
'settings' => array(
|
||||
'rows' => '20',
|
||||
'summary_rows' => 5,
|
||||
),
|
||||
'type' => 'text_textarea_with_summary',
|
||||
'weight' => '2',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// Translatables
|
||||
// Included for use with string extractors like potx.
|
||||
t('Texte de la page');
|
||||
|
||||
return $fields;
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* popsu_pages.features.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_ctools_plugin_api().
|
||||
*/
|
||||
function popsu_pages_ctools_plugin_api() {
|
||||
list($module, $api) = func_get_args();
|
||||
if ($module == "context" && $api == "context") {
|
||||
return array("version" => "3");
|
||||
}
|
||||
list($module, $api) = func_get_args();
|
||||
if ($module == "field_group" && $api == "field_group") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
list($module, $api) = func_get_args();
|
||||
if ($module == "strongarm" && $api == "strongarm") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_node_info().
|
||||
*/
|
||||
function popsu_pages_node_info() {
|
||||
$items = array(
|
||||
'popsu_page' => array(
|
||||
'name' => t('POPSU / Page'),
|
||||
'base' => 'node_content',
|
||||
'description' => t('Ce type de contenu permet de créer une page de contenu texte au sein d\'un POPSU (page d\'introduction à un POPSU ou page partenaires par exemple).'),
|
||||
'has_title' => '1',
|
||||
'title_label' => t('Titre de la page'),
|
||||
'help' => '',
|
||||
),
|
||||
);
|
||||
return $items;
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* popsu_pages.field_group.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_field_group_info().
|
||||
*/
|
||||
function popsu_pages_field_group_info() {
|
||||
$export = array();
|
||||
|
||||
$field_group = new stdClass();
|
||||
$field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */
|
||||
$field_group->api_version = 1;
|
||||
$field_group->identifier = 'group_popsu_page_text|node|popsu_page|form';
|
||||
$field_group->group_name = 'group_popsu_page_text';
|
||||
$field_group->entity_type = 'node';
|
||||
$field_group->bundle = 'popsu_page';
|
||||
$field_group->mode = 'form';
|
||||
$field_group->parent_name = '';
|
||||
$field_group->data = array(
|
||||
'label' => 'Contenu',
|
||||
'weight' => '1',
|
||||
'children' => array(
|
||||
0 => 'field_popsu_page_body',
|
||||
),
|
||||
'format_type' => 'tab',
|
||||
'format_settings' => array(
|
||||
'label' => 'Contenu',
|
||||
'instance_settings' => array(
|
||||
'required_fields' => 1,
|
||||
'classes' => '',
|
||||
'description' => '',
|
||||
),
|
||||
'formatter' => 'closed',
|
||||
),
|
||||
);
|
||||
$export['group_popsu_page_text|node|popsu_page|form'] = $field_group;
|
||||
|
||||
return $export;
|
||||
}
|
30
sites/default/modules/features/popsu_pages/popsu_pages.info
Normal file
30
sites/default/modules/features/popsu_pages/popsu_pages.info
Normal file
@@ -0,0 +1,30 @@
|
||||
name = POPSU Pages
|
||||
description = POPSU - Type de contenu Pages POPSU
|
||||
core = 7.x
|
||||
package = POPSU
|
||||
php = 5.2.4
|
||||
version = 7.x-1.0-beta9
|
||||
project = popsu_pages
|
||||
dependencies[] = context
|
||||
dependencies[] = ctools
|
||||
dependencies[] = features
|
||||
dependencies[] = field_group
|
||||
dependencies[] = menu_block
|
||||
dependencies[] = popsu_taxonomies
|
||||
dependencies[] = strongarm
|
||||
features[context][] = popsu-page-europe-node
|
||||
features[context][] = popsu-page-node
|
||||
features[ctools][] = context:context:3
|
||||
features[ctools][] = field_group:field_group:1
|
||||
features[ctools][] = strongarm:strongarm:1
|
||||
features[features_api][] = api:1
|
||||
features[field][] = node-popsu_page-field_popsu_page_body
|
||||
features[field_group][] = group_popsu_page_text|node|popsu_page|form
|
||||
features[node][] = popsu_page
|
||||
features[variable][] = field_bundle_settings_node__popsu_page
|
||||
features[variable][] = language_content_type_popsu_page
|
||||
features[variable][] = menu_options_popsu_page
|
||||
features[variable][] = menu_parent_popsu_page
|
||||
features[variable][] = node_options_popsu_page
|
||||
features[variable][] = node_preview_popsu_page
|
||||
features[variable][] = node_submitted_popsu_page
|
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Code for the POPSU Pages feature.
|
||||
*/
|
||||
|
||||
include_once 'popsu_pages.features.inc';
|
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* popsu_pages.strongarm.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_strongarm().
|
||||
*/
|
||||
function popsu_pages_strongarm() {
|
||||
$export = array();
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'field_bundle_settings_node__popsu_page';
|
||||
$strongarm->value = array(
|
||||
'view_modes' => array(
|
||||
'teaser' => array(
|
||||
'custom_settings' => TRUE,
|
||||
),
|
||||
'full' => array(
|
||||
'custom_settings' => FALSE,
|
||||
),
|
||||
'rss' => array(
|
||||
'custom_settings' => FALSE,
|
||||
),
|
||||
'search_index' => array(
|
||||
'custom_settings' => FALSE,
|
||||
),
|
||||
'search_result' => array(
|
||||
'custom_settings' => FALSE,
|
||||
),
|
||||
'token' => array(
|
||||
'custom_settings' => FALSE,
|
||||
),
|
||||
),
|
||||
'extra_fields' => array(
|
||||
'form' => array(
|
||||
'title' => array(
|
||||
'weight' => '2',
|
||||
),
|
||||
'path' => array(
|
||||
'weight' => '3',
|
||||
),
|
||||
),
|
||||
'display' => array(),
|
||||
),
|
||||
);
|
||||
$export['field_bundle_settings_node__popsu_page'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'language_content_type_popsu_page';
|
||||
$strongarm->value = '0';
|
||||
$export['language_content_type_popsu_page'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'menu_options_popsu_page';
|
||||
$strongarm->value = array(
|
||||
0 => 'menu-popsu1-menu',
|
||||
1 => 'menu-popsu2-menu',
|
||||
2 => 'menu-popsu-menu-popsu-europe',
|
||||
3 => 'main-menu',
|
||||
);
|
||||
$export['menu_options_popsu_page'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'menu_parent_popsu_page';
|
||||
$strongarm->value = 'menu-popsu1-menu:0';
|
||||
$export['menu_parent_popsu_page'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'node_options_popsu_page';
|
||||
$strongarm->value = array(
|
||||
0 => 'status',
|
||||
1 => 'revision',
|
||||
);
|
||||
$export['node_options_popsu_page'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'node_preview_popsu_page';
|
||||
$strongarm->value = '0';
|
||||
$export['node_preview_popsu_page'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'node_submitted_popsu_page';
|
||||
$strongarm->value = 0;
|
||||
$export['node_submitted_popsu_page'] = $strongarm;
|
||||
|
||||
return $export;
|
||||
}
|
Reference in New Issue
Block a user