Commit 20301510 authored by Huy Hoang's avatar Huy Hoang

profile custom

parents
Pipeline #652 failed with stages
langcode: en
status: true
dependencies:
config:
- field.field.media.image.field_media_image
- image.style.thumbnail
- media.type.image
module:
- image
- path
id: media.image.default
targetEntityType: media
bundle: image
mode: default
content:
created:
type: datetime_timestamp
weight: 5
region: content
settings: { }
third_party_settings: { }
field_media_image:
type: image_image
weight: 1
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
name:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
path:
type: path
weight: 3
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 7
region: content
settings:
display_label: true
third_party_settings: { }
translation:
weight: 6
region: content
settings: { }
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 4
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
hidden:
moderation_state: true
langcode: en
status: true
dependencies:
config:
- field.field.node.book.body
- field.field.node.book.field_image
# - field.field.node.book.field_nsx
- image.style.thumbnail
- node.type.book
module:
- datetime
- image
- path
- text
id: node.book.default
targetEntityType: node
bundle: book
mode: default
content:
body:
type: text_textarea_with_summary
weight: 121
region: content
settings:
rows: 9
summary_rows: 3
placeholder: ''
show_summary: false
third_party_settings: { }
created:
type: datetime_timestamp
weight: 10
region: content
settings: { }
third_party_settings: { }
field_image:
type: image_image
weight: 123
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
field_nsx:
type: datetime_default
weight: 122
region: content
settings: { }
third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
promote:
type: boolean_checkbox
weight: 15
region: content
settings:
display_label: true
third_party_settings: { }
status:
type: boolean_checkbox
weight: 120
region: content
settings:
display_label: true
third_party_settings: { }
sticky:
type: boolean_checkbox
weight: 16
region: content
settings:
display_label: true
third_party_settings: { }
title:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 5
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
hidden: { }
langcode: en
status: true
dependencies:
config:
- field.field.node.page.body
- node.type.page
module:
- path
- text
id: node.page.default
targetEntityType: node
bundle: page
mode: default
content:
body:
type: text_textarea_with_summary
weight: 31
region: content
settings:
rows: 9
summary_rows: 3
placeholder: ''
show_summary: false
third_party_settings: { }
created:
type: datetime_timestamp
weight: 10
region: content
settings: { }
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
promote:
type: boolean_checkbox
weight: 15
region: content
settings:
display_label: true
third_party_settings: { }
status:
type: boolean_checkbox
weight: 120
region: content
settings:
display_label: true
third_party_settings: { }
sticky:
type: boolean_checkbox
weight: 16
region: content
settings:
display_label: true
third_party_settings: { }
title:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 5
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
hidden: { }
langcode: en
status: true
dependencies:
config:
- field.field.taxonomy_term.proof_box.field_proof_box_code
- taxonomy.vocabulary.proof_box
module:
- path
- text
id: taxonomy_term.proof_box.default
targetEntityType: taxonomy_term
bundle: proof_box
mode: default
content:
description:
type: text_textarea
weight: 2
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_proof_box_code:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
name:
type: string_textfield
weight: 1
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
path:
type: path
weight: 3
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 4
region: content
settings:
display_label: true
third_party_settings: { }
hidden: { }
langcode: en
status: true
dependencies:
config:
- field.field.user.user.user_picture
- image.style.thumbnail
module:
- image
- user
id: user.user.default
targetEntityType: user
bundle: user
mode: default
content:
account:
weight: 0
region: content
settings: { }
third_party_settings: { }
contact:
weight: 4
region: content
settings: { }
third_party_settings: { }
language:
weight: 3
region: content
settings: { }
third_party_settings: { }
timezone:
weight: 5
region: content
settings: { }
third_party_settings: { }
user_picture:
type: image_image
weight: 1
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
hidden: { }
\ No newline at end of file
langcode: en
status: true
dependencies:
config:
- field.field.media.image.field_media_image
- media.type.image
- responsive_image.styles.3_2_image
module:
- responsive_image
id: media.image.default
targetEntityType: media
bundle: image
mode: default
content:
field_media_image:
type: responsive_image
label: visually_hidden
settings:
responsive_image_style: 3_2_image
image_link: ''
third_party_settings: { }
weight: 1
region: content
hidden:
created: true
langcode: true
name: true
thumbnail: true
uid: true
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.responsive_3x2
- field.field.media.image.field_media_image
- media.type.image
- responsive_image.styles.3_2_image
module:
- layout_builder
- responsive_image
third_party_settings:
layout_builder:
enabled: false
allow_custom: false
id: media.image.responsive_3x2
targetEntityType: media
bundle: image
mode: responsive_3x2
content:
field_media_image:
type: responsive_image
label: visually_hidden
settings:
responsive_image_style: 3_2_image
image_link: ''
third_party_settings: { }
weight: 1
region: content
hidden:
created: true
langcode: true
name: true
thumbnail: true
uid: true
langcode: en
status: true
dependencies:
config:
- field.field.node.book.body
- field.field.node.book.field_image
# - field.field.node.book.field_nsx
- node.type.book
module:
- datetime
- image
- text
- user
id: node.book.default
targetEntityType: node
bundle: book
mode: default
content:
body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 101
region: content
field_image:
type: image
label: above
settings:
image_link: ''
image_style: ''
image_loading:
attribute: lazy
third_party_settings: { }
weight: 103
region: content
field_nsx:
type: datetime_default
label: above
settings:
timezone_override: ''
format_type: medium
third_party_settings: { }
weight: 102
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden:
langcode: true
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.book.body
- field.field.node.book.field_image
- field.field.node.book.field_nsx
- node.type.book
module:
- text
- user
id: node.book.teaser
targetEntityType: node
bundle: book
mode: teaser
content:
body:
type: text_summary_or_trimmed
label: hidden
settings:
trim_length: 600
third_party_settings: { }
weight: 101
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
hidden:
field_image: true
field_nsx: true
langcode: true
langcode: en
status: true
dependencies:
config:
- field.field.node.page.body
- node.type.page
module:
- text
- user
id: node.page.default
targetEntityType: node
bundle: page
mode: default
content:
body:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 100
region: content
links:
weight: 101
region: content
hidden: { }
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.page.body
- node.type.page
module:
- text
- user
id: node.page.teaser
targetEntityType: node
bundle: page
mode: teaser
content:
body:
type: text_summary_or_trimmed
label: hidden
settings:
trim_length: 600
third_party_settings: { }
weight: 100
region: content
links:
weight: 101
region: content
hidden: { }
langcode: en
status: true
dependencies:
config:
- field.field.taxonomy_term.proof_box.field_proof_box_code
- taxonomy.vocabulary.proof_box
module:
- text
id: taxonomy_term.proof_box.default
targetEntityType: taxonomy_term
bundle: proof_box
mode: default
content:
description:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 1
region: content
field_proof_box_code:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
hidden: { }
langcode: en
status: true
dependencies:
config:
- field.field.user.user.user_picture
- image.style.thumbnail
module:
- image
- user
id: user.user.default
targetEntityType: user
bundle: user
mode: default
content:
member_for:
settings: { }
third_party_settings: { }
weight: 2
region: content
user_picture:
type: image
label: hidden
settings:
image_link: content
image_style: thumbnail
third_party_settings: { }
weight: 1
region: content
hidden: { }
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.user.full
- field.field.user.user.user_picture
- image.style.thumbnail
module:
- image
- user
id: user.user.full
targetEntityType: user
bundle: user
mode: full
content:
member_for:
weight: 5
region: content
user_picture:
type: image
label: hidden
settings:
image_link: content
image_style: thumbnail
third_party_settings: { }
weight: 0
region: content
hidden: { }
langcode: en
status: true
dependencies:
module:
- media
id: media.medium_8_7
label: 'Medium 8:7'
targetEntityType: media
cache: true
langcode: en
status: true
dependencies:
module:
- media
id: media.responsive_3x2
label: 'Responsive 3x2'
targetEntityType: media
cache: true
langcode: en
status: true
dependencies:
module:
- media
id: media.scale_crop_7_3_large
label: 'Scale crop 7:3 large'
targetEntityType: media
cache: true
langcode: en
status: true
dependencies:
config:
- field.storage.media.field_media_image
- media.type.image
module:
- image
enforced:
module:
- media
id: media.image.field_media_image
field_name: field_media_image
entity_type: media
bundle: image
label: Image
description: ''
required: true
translatable: true
default_value: { }
default_value_callback: ''
settings:
handler: 'default:file'
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg'
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: true
alt_field_required: true
title_field: false
title_field_required: false
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
field_type: image
langcode: en
status: true
dependencies:
config:
- field.storage.node.body
- node.type.book
module:
- text
id: node.book.body
field_name: body
entity_type: node
bundle: book
label: Body
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
display_summary: true
required_summary: false
field_type: text_with_summary
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_image
- node.type.book
module:
- image
id: node.book.field_image
field_name: field_image
entity_type: node
bundle: book
label: image
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:file'
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg'
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: true
alt_field_required: false
title_field: false
title_field_required: false
default_image:
uuid: ''
alt: ''
title: ''
width: null
height: null
field_type: image
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_nsx
- node.type.book
module:
- datetime
id: node.book.field_nsx
field_name: field_nsx
entity_type: node
bundle: book
label: NSX
description: ''
required: false
translatable: false
default_value:
-
default_date_type: now
default_date: now
default_value_callback: ''
settings: { }
field_type: datetime
langcode: en
status: true
dependencies:
config:
- field.storage.node.body
- node.type.page
module:
- text
id: node.page.body
field_name: body
entity_type: node
bundle: page
label: Body
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
display_summary: true
required_summary: false
field_type: text_with_summary
langcode: en
status: true
dependencies:
config:
- field.storage.taxonomy_term.field_proof_box_code
- taxonomy.vocabulary.proof_box
id: taxonomy_term.proof_box.field_proof_box_code
field_name: field_proof_box_code
entity_type: taxonomy_term
bundle: proof_box
label: 'Proof Box Code'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
langcode: en
status: true
dependencies:
config:
- field.storage.user.user_picture
module:
- image
- user
id: user.user.user_picture
field_name: user_picture
entity_type: user
bundle: user
label: Picture
description: 'Your virtual face or picture.'
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
handler: 'default:file'
handler_settings: { }
file_directory: 'pictures/[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg'
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: false
alt_field_required: false
title_field: false
title_field_required: false
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
field_type: image
langcode: en
status: true
dependencies:
module:
- file
- image
- media
enforced:
module:
- media
id: media.field_media_image
field_name: field_media_image
entity_type: media
type: image
settings:
target_type: file
display_field: false
display_default: false
uri_scheme: public
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
module: image
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
langcode: en
status: true
dependencies:
module:
- node
- text
id: node.body
field_name: body
entity_type: node
type: text_with_summary
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: true
custom_storage: false
langcode: en
status: true
dependencies:
module:
- file
- image
- node
id: node.field_image
field_name: field_image
entity_type: node
type: image
settings:
target_type: file
display_field: false
display_default: false
uri_scheme: public
default_image:
uuid: ''
alt: ''
title: ''
width: null
height: null
module: image
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
langcode: en
status: true
dependencies:
module:
- datetime
- node
id: node.field_nsx
field_name: field_nsx
entity_type: node
type: datetime
settings:
datetime_type: date
module: datetime
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
langcode: en
status: true
dependencies:
module:
- taxonomy
id: taxonomy_term.field_proof_box_code
field_name: field_proof_box_code
entity_type: taxonomy_term
type: string
settings:
max_length: 255
case_sensitive: false
is_ascii: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
langcode: en
status: true
dependencies:
module:
- file
- image
- user
id: user.user_picture
field_name: user_picture
entity_type: user
type: image
settings:
target_type: file
display_field: false
display_default: false
uri_scheme: public
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
module: image
locked: false
cardinality: 1
translatable: true
indexes:
target_id:
- target_id
persist_with_no_fields: false
custom_storage: false
langcode: en
status: true
dependencies: { }
name: large_3_2_2x
label: 'Large 3:2 2x (1536x1024)'
effects:
f0d332fd-0884-4f29-9f3c-befd244a63b4:
uuid: f0d332fd-0884-4f29-9f3c-befd244a63b4
id: image_scale_and_crop
weight: 1
data:
width: 1536
height: 1024
anchor: center-center
langcode: en
status: true
dependencies: { }
name: large_3_2_768x512
label: 'Large 3:2 (768x512)'
effects:
36c9f14a-8f5e-4794-92ea-bffab074f52e:
uuid: 36c9f14a-8f5e-4794-92ea-bffab074f52e
id: image_scale_and_crop
weight: 1
data:
width: 768
height: 512
anchor: center-center
langcode: en
status: true
dependencies: { }
id: image
label: Image
description: "Use local images for reusable media."
source: image
queue_thumbnail_downloads: false
new_revision: true
source_configuration:
source_field: field_media_image
field_map: { }
langcode: en
status: true
dependencies:
module:
- menu_ui
third_party_settings:
menu_ui:
available_menus:
- main
parent: 'main:'
name: Book
type: book
description: ''
help: ''
new_revision: true
preview_mode: 1
display_submitted: true
langcode: en
status: true
dependencies: { }
name: 'Basic page'
type: page
description: 'Use <em>basic pages</em> for your static content, such as an ''About us'' page.'
help: ''
new_revision: true
preview_mode: 1
display_submitted: false
langcode: en
status: true
dependencies:
config:
- image.style.large_3_2_2x
- image.style.large_3_2_768x512
id: 3_2_image
label: '3:2 Image'
image_style_mappings:
-
image_mapping_type: sizes
image_mapping:
sizes: 100vw
sizes_image_styles:
- large_3_2_2x
- large_3_2_768x512
- medium_3_2_2x
- medium_3_2_600x400
breakpoint_id: responsive_image.viewport_sizing
multiplier: 1x
breakpoint_group: responsive_image
fallback_image_style: large_3_2_768x512
langcode: en
uuid: ''
name: ''
mail: ''
slogan: ''
page:
403: ''
404: ''
front: /node
admin_compact_mode: false
weight_select_max: 100
default_langcode: en
admin: claro
default: olivero
langcode: en
status: true
dependencies: { }
name: Category
vid: category
description: ''
weight: 0
langcode: en
status: true
dependencies: { }
name: 'Proof box'
vid: proof_box
description: 'Proof box taxonomy'
weight: 0
langcode: en
anonymous: Anonymous
verify_mail: true
notify:
cancel_confirm: true
password_reset: true
status_activated: true
status_blocked: false
status_canceled: false
register_admin_created: true
register_no_approval_required: true
register_pending_approval: true
register: visitors_admin_approval
cancel_method: user_cancel_block
password_reset_timeout: 86400
password_strength: true
This diff is collapsed.
langcode: en
status: true
dependencies:
config:
- node.type.book
- node.type.page
module:
- content_moderation
id: editorial
label: Editorial
type: content_moderation
type_settings:
states:
archived:
label: Archived
weight: 5
published: false
default_revision: true
draft:
label: Draft
weight: -5
published: false
default_revision: false
published:
label: Published
weight: 0
published: true
default_revision: true
transitions:
archive:
label: Archive
from:
- published
to: archived
weight: 2
archived_draft:
label: 'Restore to Draft'
from:
- archived
to: draft
weight: 3
archived_published:
label: Restore
from:
- archived
to: published
weight: 4
create_new_draft:
label: 'Create New Draft'
from:
- draft
- published
to: draft
weight: 0
publish:
label: Publish
from:
- draft
- published
to: published
weight: 1
entity_types:
node:
- page
- book
default_moderation_state: draft
name: "INVI profile demo"
type: profile
description: "Try to code a profile."
core_version_requirement: "^9"
install:
- node
- history
- big_pipe
- block
- breakpoint
- ckeditor
- config
- contextual
- contact
- layout_builder
- layout_discovery
- menu_link_content
- datetime
- block_content
- editor
- help
- image
- media
- media_library
- menu_ui
- options
- path
- page_cache
- dynamic_page_cache
- taxonomy
- dblog
- search
- shortcut
- toolbar
- field_ui
- file
- rdf
- views
- views_ui
- tour
- automated_cron
- responsive_image
- content_moderation
- workflows
- language
- locale
- config_translation
- content_translation
- views_bulk_operations
- prevent_term_delete
# - features
themes:
- olivero
- claro
keep_english: true
<?php
/**
* @file
* Install, update and uninstall functions for the invi_profile installation
* profile.
*/
use Drupal\user\Entity\User;
use Drupal\shortcut\Entity\Shortcut;
/**
* Implements hook_requirements().
*/
function invi_profile_requirements($phase) {
$requirements = [];
if ($phase == 'runtime') {
$profile = \Drupal::installProfile();
$info = \Drupal::service('extension.list.profile')
->getExtensionInfo($profile);
$requirements['experimental_profile_used'] = [
'title' => t('Experimental installation profile used'),
'value' => $info['name'],
'description' => t('Experimental profiles are provided for testing purposes only. Use at your own risk. To start building a new site, reinstall Drupal and choose a non-experimental profile.'),
'severity' => REQUIREMENT_WARNING,
];
}
return $requirements;
}
/**
* Implements hook_install().
*
* Perform actions to set up the site for this profile.
*
* @throws \Drupal\Core\Entity\EntityStorageException
* @see system_install()
*/
function invi_profile_install(): void {
// Assign user 1 the "administrator" role.
/** @var \Drupal\user\Entity\User $user */
$user = User::load(1);
$user->addRole('administrator');
$user->save();
// We install some menu links, so we have to rebuild the router, to ensure the
// menu links are valid.
\Drupal::service('router.builder')->rebuildIfNeeded();
// Populate the default shortcut set.
$shortcut = Shortcut::create([
'shortcut_set' => 'default',
'title' => t('Add content'),
'weight' => -20,
'link' => ['uri' => 'internal:/node/add'],
]);
$shortcut->save();
$shortcut = Shortcut::create([
'shortcut_set' => 'default',
'title' => t('All content'),
'weight' => -19,
'link' => ['uri' => 'internal:/admin/content'],
]);
$shortcut->save();
//
// enable default theme
// $frontend_theme = 'claro';
// \Drupal::configFactory()->getEditable('system.theme')->set('admin', 'claro')->save(TRUE);
// \Drupal::configFactory()->getEditable('system.theme')->set('default', 'olivero')->save(TRUE);
\Drupal::service('module_installer')->install(['demo_profile_content'], TRUE);
}
standard.front_page:
title: 'Home'
route_name: '<front>'
menu_name: main
<?php
/**
* @file
* Enables modules and site configuration for a standard site installation.
*/
use Drupal\contact\Entity\ContactForm;
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_FORM_ID_alter() for install_configure_form().
*
* Allows the profile to alter the site configuration form.
*/
function invi_profile_form_install_configure_form_alter(&$form, FormStateInterface $form_state): void {
$site_name_df = 'INVI profile demo';
$email_df = 'abc@gmail.com';
$user_name_df = 'admin';
$form['site_information']['site_name']['#default_value'] = $site_name_df;
$form['site_information']['site_mail']['#default_value'] = $email_df;
$form["admin_account"]["account"]["name"]['#default_value'] = $user_name_df;
$form["admin_account"]["account"]["mail"]['#default_value'] = $email_df;
$form["regional_settings"]["site_default_country"]['#default_value'] = 'VN';
$form["regional_settings"]["date_default_timezone"]['#default_value'] = 'Asia/Ho_Chi_Minh';
$form['#submit'][] = 'invi_profile_form_install_configure_submit';
}
/**
* Submission handler to sync the contact.form.feedback recipient.
*/
function invi_profile_form_install_configure_submit($form, FormStateInterface $form_state): void {
$site_mail = $form_state->getValue('site_mail');
$password = $form_state->getValue('account')['pass'];
invi_profile_set_users_passwords($password);
}
/**
* Sets the password of admin to be the password for all users.
*/
function invi_profile_set_users_passwords($admin_password): void {
// Collect the IDs of all users with roles editor or author.
$ids = \Drupal::entityQuery('user')
->accessCheck(FALSE)
->condition('roles', ['author', 'editor'], 'IN')
->execute();
$users = \Drupal::entityTypeManager()->getStorage('user')->loadMultiple($ids);
foreach ($users as $user) {
$user->setPassword($admin_password);
$user->save();
}
}
# Deny all requests from Apache 2.4+.
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
# Deny all requests from Apache 2.0-2.2.
<IfModule !mod_authz_core.c>
Deny from all
</IfModule>
# Turn off all options we don't need.
Options -Indexes -ExecCGI -Includes -MultiViews
Creative Commons Attribution-ShareAlike 4.0 International License
================================================================================
The following image files:
chili-sauce-umami.jpg by Elliot Ward
chocolate-brownie-umami.jpg by Keith Jay
heritage-carrots.jpg by Keith Jay
home-grown-herbs.jpg by Keith Jay
mediterranean-quiche-umami.jpg by Keith Jay
mushrooms-umami.jpg by Keith Jay
pineapple-placeholder-10.jpg by Keith Jay
pizza-umami.jpg by Keith Jay
supermarket-savvy-umami.jpg by Keith Jay
thai-green-curry-umami.jpg by Keith Jay
vegan-chocolate.jpg by Keith Jay
vegan-chocolate-nut-brownies.jpg by Keith Jay
veggie-pasta-bake-hero-umami.jpg by Keith Jay
veggie-pasta-bake-umami.jpg by Keith Jay
victoria-sponge-umami.jpg by Keith Jay
watercress-soup-umami.jpg by Keith Jay
crema-catalana-umami.jpg by Cristina Chumillas
mojito-mocktail.jpg by Keith Jay
oatmeal-fruit-syrup-topping.jpg by Keith Jay
are all licensed under a http://creativecommons.org/licenses/by-sa/4.0/ Creative
Commons Attribution-ShareAlike 4.0 International License.
================================================================================
<p>You follow the recipe, you weigh all your ingredients, you use the right oven temperature and you take your time and yet still, your baking comes out with a soggy bottom, fails to rise or just tastes plain horrible. We have come up with a list of the most frustrating baking problems and the techniques you can use to try and avoid them.</p>
<h2>Your cake failed to rise</h2>
<p>Don't under any circumstances open the oven door in the middle of the cooking time. The heat will come whooshing out, destroying the chemical reaction taking place inside your cake. Your raising agent needs the heat to become activated and you might kill it off.</p>
<h2>Your cake is chewy and tough</h2>
<p>If your light sponge is the consistency of a spare tire, you might have over-mixed your batter. Keep the lightness inside your cake mixture by carefully and gently folding in the ingredients and only to the point they are just mixed. If you over-fold, the gluten in the flour will start to come out and you'll be making bread instead of cake.</p>
<h2>Your cookies burned</h2>
<p>A great trick is to use light colored bakeware, rather than black. It is less likely to absorb the heat and transfer it to the bottom of your biscuits. Using baking paper will also help with this. Also, using too much sugar can result in your cookies browning too much and giving them a caramelized look.</p>
<h2>Split top to your cake or bread</h2>
<p>Your oven is very likely too hot. If you suspect your oven doesn't keep to the right temperature, invest in a thermometer and check it regularly throughout the cooking. With bread, over-mixing the dough can result in a cracked or split top.</p>
<h2>The dreaded soggy bottom</h2>
<p>As mentioned above, the color of your pan is important. In this case, a dark pan will increase the heat at the bottom and give you that crisp underneath that you want. If you are using a flaky pastry, you really need to blind bake it. Putting your pie towards the bottom of the oven will increase the heat reaching that part.</p>
<h2>Your pastry has shrunk</h2>
<p>You simply tried to make it stretch too far. When rolling, don't try to make it too thin or too big and when draping over your pan, allow it to settle on its own without stretching it to fit. Or just add more pastry - everyone loves pastry anyway!</p>
<p>The calendar is full of excuses for chocolate-lovers to indulge, from religious festivals to birthdays - and even World Chocolate Day on the 7th July. But for those who are vegan, or on dairy-free diets, there is no need to miss out, because there are plenty of delicious vegan chocolate varieties on offer.</p>
<p>Dairy-free milk chocolate is made in largely the same way as regular chocolate, until the point when the milk is added. Cacao beans are roasted for a couple of hours until they develop a rich flavor. The outer shells are removed, and the interior nibs are ground to make a paste that can be mixed with cocoa butter to produce the desired percentage of chocolate. Flavorings, sugar and milk are added in different quantities to get the type of chocolate being produced. The chocolate is grainy at this point and needs to be mashed until it is smooth - this can take days! Finally, it is tempered through a process of heating and cooling until it is ready to eat.</p>
<p>So, how do vegan chocolatiers get that creamy milk flavor and texture into their products?</p>
<h2>Rice milk</h2>
<p>The flavor of rice milk perfectly complements the cocoa beans and it was one of the first dairy milk alternatives to be used to create vegan milk chocolate. Rice milk is made from rice powder and is sometimes combined with hazelnut milk to create the correct texture and taste that is ideal for producing all kinds of chocolate bars.</p>
<h2>Coconut milk</h2>
<p>Coconut milk has to be the perfect ingredient for adding creaminess into a chocolate bar. With high fat levels, a sweet, but not overpowering taste and the correct consistency, coconut milk is a great choice for vegan milk chocolate. Chocolate made in this way will melt wonderfully for drizzling or dipping, and the coconut milk adds a slight tropical flavor that works well with other fruit flavors and nuts.</p>
<h2>Soy milk</h2>
<p>Soy has long been the mainstay of vegan and vegetarian diets, as it is rich in protein and is available in a wide variety of textures suitable for all kinds of dishes. Soy milk is widely available and is a great alternative to dairy milk in chocolate. It isn&rsquo;t as rich in fat as some vegan milks, but does have a neutral taste that makes it easy to combine with almost any other flavor.</p>
<h2>Nut milks</h2>
<p>Milks made from almonds and hazelnuts are easy to find on supermarket shelves, and are perfect for chocolate production. Like soy milk, they can be quite low in fat and therefore a little less creamy, but they have that nutty taste that goes so well with chocolate of all kinds.</p>
<p>Many manufacturers will use a combination of the above milks to create the perfect consistency for their product. Using this milk mixture they are able to produce all kinds of milk chocolates, including white chocolate.</p>
<p>There's nothing like having your own supply of fresh herbs, readily available and close at hand to use while cooking. Whether you have a large garden or a small kitchen window sill, there's always enough room for something home grown.</p>
<h2>Outdoors</h2>
<h3>Mint</h3>
<p>Mint is a great plant to grow as it's hardy and can grow in almost any soil. Mint can grow wild, so keep it contained in a pot or it might spread and take over your whole garden.</p>
<h3>Sage</h3>
<p>Like mint, sage is another prolific growing plant and will take over your garden if you let it. Highly aromatic, the sage plant can be planted in a pot or flower bed in well drained soil. The best way to store the herb is to sun dry the leaves and store in a cool, dark cupboard in a sealed container.</p>
<h3>Rosemary</h3>
<p>Rosemary plants grow into lovely shrubs. Easily grown from cuttings, rosemary plants do not like freezing temperatures so keep pots or planted bushes near the home to shelter them from the cold. It grows well in pots as it likes dry soil, but can survive well in the ground too. If pruning rosemary to encourage it into a better shape, save the branches and hang them upside down to preserve the flavor and use in food.</p>
<h2>Indoors</h2>
<h3>Basil</h3>
<p>Perfect in sunny spot on a kitchen window sill. Basil is an annual plant, so will die off in the autumn, so it's a good idea to harvest it in the summer if you have an abundance and dry it. Picked basil stays fresh longer if it is placed in water (like fresh flowers). A great way to store basil is to make it into pesto!</p>
<h3>Chives</h3>
<p>A versatile herb, chives can grow well indoors. Ensure the plant is watered well, and gets plenty of light. Remember to regularly trim the chives. This prevents the flowers from developing and encourages new growth.</p>
<h3>Coriander (Cilantro)</h3>
<p>Coriander can grow indoors, but unlike the other herbs, it doesn't like full sun. If you have a south facing kitchen window, this isn't the place for it. Although not as thirsty as basil, coriander doesn't like dry soil so don't forget to water it! Cut coriander is best stored in the fridge.</p>
<p>
It is vegan, gluten-free, low in fat, high in fiber, and can even lower cholesterol - but oatmeal is boring, right? Well, before you write off that boring jar of oats, you might want to take inspiration from our topping ideas that will take your oatmeal from bland to creatively delicious in just a few minutes.
</p>
<p>
Call it oatmeal, porridge, hot cereal, or just plain oats, it is loved the world over; but recently, the humble oat is getting a funky makeover. Long gone are the days of stodgy breakfast bowls of thick gloop, because oats are getting served up as a delicious meal that can suit any time of the day. Trendy build-your-own oatmeal bars are popping up, and they are providing the ultimate oatmeal experience. Diners can choose their oats to be made with milk or water and then go to town with their choice of favorite toppings - sweet, savory, or even spicy.
</p>
<p>
It sounds great, doesn’t it? So before you close the cupboard door on that bland-looking jar of oats, we think you should try some of these scrumptious topping ideas to inspire your very own oatmeal makeover.
</p>
<h2>Soaked dried fruit</h2>
<p>
Sometimes plain dried fruit can be a bit chewy and harsh when combined with creamy oats. But if you simply soak your dried fruit in orange juice overnight, they develop a tang, and they swell up, making them softer and even more delicious. Plus the splash of color can really brighten your day.
</p>
<h2>Porridge crème brûlée</h2>
<p>
So simple - but why has no one thought of it before? Put your cooked oatmeal into a ramekin, sprinkle with sugar, and pop under the grill. The sugar will harden, giving you the delight of cracking through the surface and scooping out the creamy deliciousness beneath. If you are really professional, you can use a blow torch.
</p>
<h2>Super seeds</h2>
<p>
For a more savory meal option, cook your oats with water, a little salt, and sprinkle with toasted seeds. You can choose any that you enjoy, but pumpkin seeds, sesame, linseed, and sunflower seeds are especially good. Some supermarkets also sell seed blends to make the job even easier.
</p>
<h2>Deconstructed carrot cake</h2>
<p>
Cook your oats with grated carrots and a little sugar, then top with a sprinkle of cinnamon, chopped walnuts, and a dollop of sweetened cream cheese. If you don’t love this, there’s something wrong with your taste buds.
</p>
<h2>Dark chocolate</h2>
<p>
This low-sugar delight will meet all of those chocolate cravings and is the perfect dessert. Add a spoonful of cocoa to your oatmeal as it cooks, then top with a few squares of dark chocolate. As it melts, simply swirl into the bowl as artfully as you can. If you are really decadent, a squirt of whipped cream will add further delights.
</p>
<p>Let's hear it for the humble carrot! This sweet and healthy &lsquo;everyday&rsquo; veg packs it all in. Great flavor, fantastic color, and if you're one for believing the old story, they can even help you to see better in the dark.</p>
<p>Who doesn't love cooking with this super versatile root veg? We roast them, boil them, blend them into soups, and grate them into salads. The humble carrot has to be one of our favorite veg choices and it's been grown for thousands of years. But back then you were more likely to find a purple, red, yellow or white carrot and not the orange one we are all so familiar with today.</p>
<h2>So what happened? When did orange become the preferred color?</h2>
<p>It was the Dutch during the 17th century who cultivated and made popular the orange variety, most likely because of its brilliant color and higher levels of beta carotene. And it has also been suggested that they were cultivated in tribute to William of Orange, who led the struggle during the Dutch battle for independence.</p>
<p>For whatever reason, the orange variety has stuck but look out for the &lsquo;heritage&rsquo; varieties at farmers markets and grocers, their mix of purple, yellow, orange and white are especially appealing to cook with and look absolutely great served as a side dish.</p>
<h2>Nutrition</h2>
<p>Carrots are rich in beta carotene which your body converts into vitamin A. It's often tricky to know whether cooking vegetables will enhance or reduce their nutritious value and unfortunately there's no simple rule. But in the case of carrots, nutrition is enhanced by consuming them cooked. In fact, it only takes 100 grams of carrots to get more than your daily value of vitamin A.</p>
<h2>Get them at their best</h2>
<p>Young carrots, harvested when they are small have an especially sweet flavor and they are absolutely delicious. To cook them you can skip the peeling, give them a good wash and pop them in the steamer for just a few minutes. Carrots will taste the best when they are fresh, so make sure they are firm and bright in color when buying.</p>
<h2>And that thing about carrots helping you see more in the dark?</h2>
<p>Of course it's a myth. During World War II the UK Ministry of Food promoted carrots as a super healthy veggie that would improve your ability to see during the blackouts and as an explanation for the successful night missions of UK fighter pilots. In reality, the only truth in the connection between carrots and improved eye sight is that vitamin A does indeed help to maintain vision.</p>
<p>Having a cocktail party? Then why not serve up something just as special for those who don't drink alcohol but do want to join in on all the fun? After all, what cocktail party is complete without those incredible looking glasses of mixed fruits, bright colors and of course, the little umbrellas? Do your bit for the environment by ditching the plastic straws and get hold of some great looking alternatives made out of glass, metal, or even bamboo. Don't forget the classic cocktail glasses and cool tumblers to really bring these recipes to life.
</p>
<p>
So, grab the cocktail mixer, skip the spirits, and shake up these deliciously refreshing mocktails that won't leave you or your guests, short on flavor or style.
</p>
<h2>Mango-licious</h2>
<p>This delicious drink has a sophisticated taste that is ideal for adults and the color is perfect for a late summer BBQ.</p>
<h3>Instructions:</h3>
<p>Give a few slices of cucumber and a little honey a good shake in a cocktail shaker. Add a spirit measure of mango puree and the juice of one lime. Add some ice and shake for all you're worth. Using a strainer, pour into a fancy glass and top with ginger beer. A few slices of lime and you're ready to go.</p>
<h2>Mocky Mojito</h2>
<p>There's nothing quite like a Mojito on a warm day and this version is ideal for a relaxing end of the day moment of bliss in the garden.</p>
<h3>Instructions:</h3>
<p>Muddle sugar, a squeeze of lime, and mint leaves in a tall glass, then add a few chunks of ice, top with the juice of a blood orange (for the sunset effect), and add a splash of soda water. Add a few sprigs of mint for an authentic look.</p>
<h2>Sinless Strawberry Martini</h2>
<p>Strawberries add a beautiful rich red to this mocktail, while the ginger gives it a little kick. Serve in a proper martini glass, but maybe avoid the olives.</p>
<h3>Instructions:</h3>
<p>Muddle a strawberry with a dash a ginger beer and some sugar syrup in a cocktail shaker. Add a capful of elderflower cordial and a few mint leaves. Throw in a slice of orange and lemon and shake with ice. Strain into your glass and enjoy the sweet strawberry flavor.</p>
<h2>Coconut Queen</h2>
<p>Crazy about coconuts? Then you'll love the refreshing taste of this coconut based mocktail. The flavors give a hint of the tropical, while the look is grown-up sophistication.</p>
<h3>Instructions:</h3>
<p>Add sliced cucumbers, the juice of a lime or two, and some mint leaves to a pitcher of coconut water and leave to chill and infuse for a few hours in the fridge. You can also add some sugar if you fancy this sweeter. Serve poured into glasses full of ice with sliced cucumber and mint leaves. Simple and beautiful.</p>
<p>This may not surprise you - but your supermarket is a hot bed of marketing mayhem, designed to improve their profit and to encourage the consumer to spend more than they intended. The tricks that all supermarkets employ are sometimes sensible ploys that any retailer should do to improve sales - but some may be more subtle and less obvious than you might think.</p>
<p>With consumer awareness articles and documentaries frequently picking up on this topic, it's likely the case that retailers find it harder to get away with the more obvious ploys. We are becoming ever more savvy consumers and there's probably not a great deal that gets past us. But here's a few retail tricks to keep in mind when you are rushing around the weekly supermarket stock-up.</p>
<h2>Lost essentials</h2>
<p>The layout of your supermarket may make sense to you when you have shopped there for a while. But for newcomers trying to find essentials, it may make very little sense at all. Some supermarkets have noted that people come to their store to buy milk, bread, or eggs and that by hiding these essentials in the far reaches of the store, they encourage the newcomer to wander the aisles - picking up other items as they go.</p>
<p>Sure, this can be great for nudging the memory on essentials you might otherwise forget, but for saving the pennies it's tough to stick to grabbing only the things you came for and the supermarkets know it!</p>
<blockquote>
Our tip: Make your shopping list before leaving the house, checking what you need and sticking to that list. You could be amazed by what you'll save over time.
</blockquote>
<h2>Nonsensical multibuys</h2>
<p>Buy one, get one free; two for &pound;2 and meal deals. They all seem like a great deal. But in some cases these are loss leaders that are positioned to encourage you to take up the deal and buy other stuff while you are there. In other cases, deals for multi-buy or discounts on specific pack sizes might seem like a bargain, until you compare the pricing like-for-like on similar brands or with pack sizes for the same brand. These deals can mean you end up paying less but is it less for something you don't really need and in some cases you can end up paying more for the item. Remember, the supermarkets know you are often in a hurry and might not have the time to take in the full picture.</p>
<blockquote>
<p>Our tip: Don't be rushed, take the time to read the small print. The large print will draw you in but if you read the label small print, you should find the price per 100 grams or per ounce/litre and you'll be surprised how often the headline deals are actually more expensive than just buying a different package type or size of the product.</p>
</blockquote>
<h2>Understanding our shopping habits</h2>
<p>The cheapest products in a supermarket are almost always positioned on the bottom of the shelving where you'll need to bend over to pick it up. You also may not be able to easily read the price ticket. Most people will shop on the middle rows because it is easier and often quicker. These are where the highest profit items are kept and they are the ones the supermarkets want you to buy.</p>
<p>The layout, the music, the colors, and the product types are all decided based on principles laid down by industry experts on people - psychologists and behavioral experts who know how we think. And so the savvy shopper will certainly be able to take advantage of great deals in their weekly shop, but it takes a little time and effort just to be more aware of what we are being encouraged to reach for in the aisles.</p>
<p>We think mushrooms are one of the most enjoyable ingredients to cook with. There are plenty of edible varieties to try, each with their own distinctive shape, size, and taste. And with curious names such as chanterelle, the gypsy, horn of plenty, or hen of the woods, who wouldn't want to know more about cooking with the mighty mushroom?</p>
<p>One of the best things about mushrooms is their versatility. They can be fried, roasted, grilled, steamed, or even cooked in the microwave. And they can be served as the main ingredient for a dish, or simply added as part of the mix. This makes mushrooms an ideal choice for creating absolutely delicious vegetarian dishes.</p>
<p>So let's take a look at some of our favorite types of mushroom. You might not have tried cooking with them before but don't let that put you off. With their delicious, distinctive flavors you can easily transform soups, starters, sauces and create amazing pasta, or stir-fry dishes.</p>
<p>Try the lovely <strong>shiitake</strong>. Used in Asian cooking, these can be purchased dried and rehydrated for a strong, deep flavor. Or buy fresh and add to soups and stir-fries. Not only does this mushroom have an intense flavor, it looks lovely too. The deep brown and smooth shapes will provide texture to your meal. In their dried form and rehydrated, these are the perfect addition for a deep and flavorful stock for a risotto.</p>
<p>The gorgeous sunny <strong>chanterelle</strong> with its yellow flesh has a fruity flavor - but it is worth mentioning that there are many lookalikes out there and care should be taken to ensure you're eating the right ones. These look great in an omelette or an Asian soup to complement the yellow tones.</p>
<p>The brown <strong>morel</strong> offers a meaty and distinctive flavor and you'll probably love how extraordinary they look in a meal. The morel is a more popular mushroom during the spring, when their availability is high.</p>
<p>For delicacy try the <strong>enoki</strong> with its tiny white heads that grow in a bunch. These can even be eaten raw in salads. Finally, you can choose the popular <strong>oyster</strong> mushroom. They are named thus because they look nothing like a mushroom and resemble the innards of an oyster and their sweet flavor is delicious.</p>
id,title,image,alt,author
1,Deep mediterranean quiche,mediterranean-quiche-umami.jpg,A delicious deep layered Mediterranean quiche with basil garnish,Umami
2,Vegan chocolate and nut brownies,vegan-chocolate-nut-brownies.jpg,"A stack of chocolate and pecan brownies, sprinkled with pecan crumbs and crushed walnut, fresh out of the oven",Umami
3,Super easy vegetarian pasta bake,veggie-pasta-bake-umami.jpg,Cheesy pasta dish with vegetarian sausages and topped with mozzarella cheese and basil,Umami
4,Watercress soup,watercress-soup-umami.jpg,Watercress soup with a sprig of coriander as garnish in a white bowl with green trim,Umami
5,Victoria sponge cake,victoria-sponge-umami.jpg,"A classic, uncut Victoria sponge with a deep filling of butter cream and jam",Umami
6,Gluten free pizza,pizza-umami.jpg,"Olives, basil, and mozzarella top a gluten free pizza crust with marinara sauce",Umami
7,Thai green curry,thai-green-curry-umami.jpg,"A traditional bowl of creamy, aromatic Thai green curry with chunks of chicken in a small bowl with jasmine rice",Umami
8,Crema catalana,crema-catalana-umami.jpg,"Typical Catalan dessert made from cream and egg yolks, covered with a traditional layer of caramelized sugar to provide a crispy contrast",Umami
9,Fiery chili sauce,chili-sauce-umami.jpg,"An iridescent array of chilies, onions, and garlic, slowly sweating over a low heat",Umami
10,Home Grown Herbs,home-grown-herbs.jpg,"Fresh cut herbs including mint, parsley, thyme and dill",Holly Foat
11,Vegan Chocolate,vegan-chocolate.jpg,"A delicious bar of dairy-free milk chocolate, broken into pieces",Umami
12,Supermarket Savvy Umami,supermarket-savvy-umami.jpg,Leafy greens presented on supermarket produce shelving,Megan Collins Quinlan
13,Mushrooms Umami,mushrooms-umami.jpg,A delightful selection of mushroom varieties laid out on a simple wooden plate,Umami
14,Heritage Carrots,heritage-carrots.jpg,"Purple, orange, yellow and white heritage carrots",Umami
15,Chocolate Brownie Umami,chocolate-brownie-umami.jpg,A delicious chocolate brownie,Umami
16,Mojito Mocktail,mojito-mocktail.jpg,"Fresh mojito mocktail with garnish of mint leaves, ice, and sliced lime",Megan Collins Quinlan
17,Oatmeal Fruit Syrop Topping,oatmeal-fruit-syrup-topping.jpg,"Oatmeal topped with a vibrant mix of berries, nuts, and seeds",Umami
18,Mouth watering vegetarian pasta bake with rich tomato sauce and cheese toppings,veggie-pasta-bake-hero-umami.jpg,Mouth watering vegetarian pasta bake with rich tomato sauce and cheese toppings,Umami
19,3 issue bundle of the Umami food magazine,umami-bundle.png,3 issue bundle of the Umami food magazine,Umami
20,(Hero) Vegan chocolate and nut brownies,2.jpeg,"A stack of chocolate and pecan brownies, sprinkled with pecan crumbs and crushed walnut, fresh out of the oven",Umami
21,Borscht with pork ribs,1.jpeg,"Traditional Ukrainian soup with beets, tomatoes, and pork ribs",Umami
id,title,body,slug,image_reference
1,Give grow your own herbs,give-it-a-go-and-grow-your-own-herbs.html,give-it-a-go-and-grow-your-own-herbs,10
2,Dairy-free and delicious milk chocolate,dairy-free-delicious-milk-chocolate.html,dairy-free-and-delicious-milk-chocolate,11
3,Thesupermarket savvy shopping,the-real-deal-for-supermarket-savvy-shopping.html,the-real-deal-for-supermarket-savvy-shopping,12
4,The Umami guide to our favorite mushrooms,the-umami-guide-to-our-favourite-mushrooms.html,the-umami-guide-to-our-favourite-mushrooms,13
5,Let's hear it for carrots,lets-hear-it-for-carrots.html,lets-hear-it-for-carrots,14
6,Baking mishaps - our troubleshooting tips,baking-mishaps-our-troubleshooting-tips.html,baking-mishaps-our-troubleshooting-tips,15
7,Skip the spirits with delicious mocktails,skip-the-spirits-with-delicious-mocktails.html,skip-the-spirits-with-delicious-mocktails,16
8,Give your oatmeal the ultimate makeover,give-your-oatmeal-the-ultimate-makeover.html,give-your-oatmeal-the-ultimate-makeover,17
id,title,body,author,slug
1,About Profile,"<p>Umami is a fictional food magazine that has been created to demonstrate how you might build a Drupal site using functionality provided 'out of the box'.</p><p>For more information visit <a href='https://www.drupal.org/docs/umami-drupal-demonstration-installation-profile'>https://www.drupal.org/docs/umami-drupal-demonstration-installation-profile</a>.</p>",Samuel Adamson,about-umami
id,term
1,Alcohol free
2,Baked
3,Baking
4,Breakfast
5,Cake
6,Carrots
7,Chocolate
8,Cocktail party
9,Dairy-free
10,Dessert
11,Dinner party
12,Drinks
id,term
1,Accompaniments
2,Desserts
3,Main courses
4,Snacks
5,Starters
name: 'profile demo'
description: Imports the content for the demo.
type: module
version: VERSION
core_version_requirement: '^9'
package: 'Core (Experimental)'
lifecycle: experimental
hidden: true
dependencies:
- drupal:field
- drupal:file
- drupal:image
- drupal:node
- drupal:options
- drupal:path
- drupal:taxonomy
- drupal:text
- drupal:user
<?php
/**
* @file
* Install, update and uninstall functions for the module.
*/
use Drupal\demo_profile_content\InstallHelper;
/**
* Implements hook_module_preinstall().
*/
function demo_profile_content_module_preinstall($module) {
if ($module === 'demo_profile_content' && !\Drupal::service('config.installer')->isSyncing()) {
// Run before importing config so blocks are created with the correct
// dependencies.
\Drupal::classResolver(InstallHelper::class)->importContent();
}
}
/**
* Implements hook_uninstall().
*/
function demo_profile_content_uninstall($is_syncing) {
if (!$is_syncing) {
\Drupal::classResolver(InstallHelper::class)->deleteImportedContent();
}
}
This diff is collapsed.
This diff is collapsed.
{
"description": "Enables administrators to package configuration into modules",
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"name": "drupal/features",
"require": {
"drupal/config_update": "^1.4"
},
"type": "drupal-module",
"extra": {
"drush": {
"services": {
"drush.services.yml": "^9 || ^10"
}
}
}
}
langcode: en
status: true
dependencies: { }
name: Default
machine_name: default
description: ''
assignments:
alter:
core: true
uuid: true
user_permissions: true
enabled: true
weight: 0
base:
types:
config:
comment_type: comment_type
node_type: node_type
content:
user: user
enabled: true
weight: -2
core:
types:
config:
date_format: date_format
field_storage_config: field_storage_config
entity_form_mode: entity_form_mode
image_style: image_style
menu: menu
responsive_image_style: responsive_image_style
user_role: user_role
entity_view_mode: entity_view_mode
enabled: true
weight: 5
dependency:
enabled: true
weight: 15
exclude:
types:
config:
features_bundle: features_bundle
curated: true
module:
installed: true
profile: true
namespace: true
namespace_any: false
enabled: true
weight: -5
existing:
enabled: true
weight: 12
forward_dependency:
enabled: true
weight: 4
namespace:
enabled: true
weight: 0
optional:
types:
config: {}
enabled: true
weight: 0
packages:
enabled: true
weight: -20
profile:
curated: true
standard:
files: true
dependencies: true
types:
config:
block: block
language_content_settings: language_content_settings
configurable_language: configurable_language
migration: migration
shortcut_set: shortcut_set
tour: tour
enabled: true
weight: 10
site:
types:
config:
action: action
contact_form: contact_form
block_content_type: block_content_type
rdf_mapping: rdf_mapping
search_page: search_page
taxonomy_vocabulary: taxonomy_vocabulary
editor: editor
filter_format: filter_format
enabled: true
weight: 7
profile_name: ''
is_profile: false
export:
folder: 'custom'
langcode: en
features.settings:
type: config_object
label: 'Features settings'
mapping:
export:
type: mapping
label: "Export settings"
mapping:
folder:
type: string
label: "Folder"
langcode:
type: string
label: "Language Code"
features.bundle.*:
type: config_entity
label: 'Features bundle'
mapping:
machine_name:
type: string
label: "Machine name"
name:
type: string
label: "Name"
description:
type: string
label: "Description"
assignments:
type: sequence
label: "Assignment"
sequence:
type: features.assignment.[%key]
profile_name:
type: string
label: "Profile name"
is_profile:
type: boolean
label: "Is install profile"
features.assignment.settings:
type: mapping
label: "Assignment settings"
mapping:
enabled:
type: boolean
label: "Enabled"
weight:
type: integer
label: "Weight"
features.assignment.*:
type: features.assignment.settings
features.assignment.base:
type: features.assignment.settings
label: "Base type"
mapping:
types:
type: mapping
label: "Types"
mapping:
config:
type: sequence
label: "Configuration Types"
sequence:
type: string
content:
type: sequence
label: "Content entity types"
sequence:
type: string
features.assignment.core:
type: features.assignment.settings
label: "Core type"
mapping:
types:
type: mapping
label: "Types"
mapping:
config:
type: sequence
label: "Configuration Types"
sequence:
type: string
features.assignment.exclude:
type: features.assignment.settings
label: "Exclude"
mapping:
types:
type: mapping
label: "Types"
mapping:
config:
type: sequence
label: "Configuration Types"
sequence:
type: string
curated:
type: boolean
label: "Exclude designated site-specific configuration"
module:
type: mapping
label: "Module"
mapping:
installed:
type: boolean
label: "Exclude installed module-provided entity configuration"
profile:
type: boolean
label: "Don't exclude install profile's configuration"
namespace:
type: boolean
label: "Don't exclude non-installed configuration by namespace"
namespace_any:
type: boolean
label: "Don't exclude ANY configuration by namespace"
features.assignment.optional:
type: features.assignment.settings
label: "Optional"
mapping:
types:
type: mapping
label: "Types"
mapping:
config:
type: sequence
label: "Configuration Types"
sequence:
type: string
features.assignment.profile:
type: features.assignment.settings
label: "Profile"
mapping:
curated:
type: boolean
label: "Add commonly-needed configuration"
standard:
type: mapping
label: "Standard"
mapping:
files:
type: boolean
label: "Add configuration and files from Standard profile"
dependencies:
type: boolean
label: "Add module and theme dependencies from Standard profile"
types:
type: mapping
label: "Types"
mapping:
config:
type: sequence
label: "Configuration Types"
sequence:
type: string
features.assignment.site:
type: features.assignment.settings
label: "Site"
mapping:
types:
type: mapping
label: "Types"
mapping:
config:
type: sequence
label: "Configuration Types"
sequence:
type: string
features.assignment.alter:
type: features.assignment.settings
label: "Alter"
mapping:
core:
type: boolean
label: "Core"
uuid:
type: boolean
label: "UUID"
user_permissions:
type: boolean
label: "User permissions"
services:
features.commands:
class: \Drupal\features\Commands\FeaturesCommands
arguments:
- '@features_assigner'
- '@features.manager'
- '@features_generator'
- '@config_update.config_diff'
- '@config.storage'
tags:
- { name: drush.command }
This diff is collapsed.
name: 'Features'
type: module
description: 'Enables administrators to package configuration into modules.'
package: Development
core_version_requirement: ^8.8 || ^9
dependencies:
- drupal:config
- config_update:config_update
# Information added by Drupal.org packaging script on 2021-02-09
version: '8.x-3.12'
project: 'features'
datestamp: 1612830533
<?php
/**
* @file
* Contains install and update functions for Features.
*/
/**
* Rebuild the container to add a parameter to the features.manager service.
*/
function features_update_8300() {
// Empty update to cause a cache rebuild so that the container is rebuilt.
}
/**
* Update existing feature bundles with new alter plugin configuration.
*/
function features_update_8301() {
foreach (\Drupal::service('entity_type.manager')->getStorage('features_bundle')->loadMultiple() as $bundle) {
$bundle = \Drupal::configFactory()->getEditable('features.bundle.' . $bundle->id());
$assignments = $bundle->get('assignments');
$assignments['alter'] = [
'core' => TRUE,
'uuid' => TRUE,
'user_permissions' => TRUE,
'enabled' => TRUE,
'weight' => 0,
];
$bundle->set('assignments', $assignments)->save();
}
}
<?php
/**
* @file
* Main hooks for Features module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function features_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.features':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Features module provides a user interface for exporting bundles of configuration into modules. For more information, see the online documentation for <a href=":url">Features module</a>', [
':url' => 'http://drupal.org/node/2404427',
]) . '</p>';
return $output;
}
}
/**
* Implements hook_file_download().
*/
function features_file_download($uri) {
$stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
$scheme = $stream_wrapper_manager->getScheme($uri);
$target = $stream_wrapper_manager->getTarget($uri);
if ($scheme == 'temporary' && $target) {
$request = \Drupal::request();
$route = $request->attributes->get('_route');
// Check if we were called by Features download route.
// No additional access checking needed here: route requires
// "export configuration" permission, token is validated by the controller.
// @see \Drupal\features\Controller\FeaturesController::downloadExport()
if ($route == 'features.export_download') {
return [
'Content-disposition' => 'attachment; filename="' . $target . '"',
];
}
}
}
/**
* Implements hook_modules_installed().
*/
function features_modules_installed($modules) {
if (!in_array('features', $modules)) {
/** @var \Drupal\features\FeaturesAssignerInterface $assigner */
$assigner = \Drupal::service('features_assigner');
$assigner->purgeConfiguration();
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment