Skip to content

Commit

Permalink
11.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Oct 16, 2024
1 parent 9cd43c5 commit 5fec035
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Stanford Profile

11.4.5
-------------------------------------------------------------------------------
- Remove edit links in views (#821)
- D8CORE-7564: removed decanter link and replaced with identity guide (#822)
- D8CORE-7517 | update event subtitle heading (#816)
- D8Core-7515: adding a few additional "Site Type" options

11.4.4
-------------------------------------------------------------------------------
- Updated image_effects module for compatibility with imagemagic 4.0.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_key
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_search
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_ui
- field.field.config_pages.stanford_basic_site_settings.su_site_created
- field.field.config_pages.stanford_basic_site_settings.su_site_dropdowns
- field.field.config_pages.stanford_basic_site_settings.su_site_email
- field.field.config_pages.stanford_basic_site_settings.su_site_home
Expand All @@ -35,9 +36,11 @@ dependencies:
- change_labels
- conditional_fields
- cshs
- field_formatter_class
- field_group
- file
- link
- readonly_field_widget
- text
third_party_settings:
field_group:
Expand Down Expand Up @@ -248,6 +251,42 @@ content:
settings:
display_label: true
third_party_settings: { }
su_site_created:
type: readonly_field_widget
weight: 1
region: content
settings:
label: above
formatter_type: timestamp
formatter_settings:
timestamp:
date_format: html_date
custom_date_format: ''
timezone: ''
tooltip:
date_format: long
custom_date_format: ''
time_diff:
enabled: false
future_format: '@interval hence'
past_format: '@interval ago'
granularity: 2
refresh: 60
description: ''
formatter_third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
field_label:
label_value: ''
label_tag: ''
show_description: false
third_party_settings:
field_formatter_class:
class: ''
change_labels:
field_label_overwrite: ''
su_site_dropdowns:
type: boolean_checkbox
weight: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_key
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_search
- field.field.config_pages.stanford_basic_site_settings.su_site_algolia_ui
- field.field.config_pages.stanford_basic_site_settings.su_site_created
- field.field.config_pages.stanford_basic_site_settings.su_site_dropdowns
- field.field.config_pages.stanford_basic_site_settings.su_site_email
- field.field.config_pages.stanford_basic_site_settings.su_site_home
Expand Down Expand Up @@ -150,6 +151,25 @@ content:
third_party_settings: { }
weight: 23
region: content
su_site_created:
type: timestamp
label: above
settings:
date_format: medium
custom_date_format: ''
timezone: ''
tooltip:
date_format: long
custom_date_format: ''
time_diff:
enabled: false
future_format: '@interval hence'
past_format: '@interval ago'
granularity: 2
refresh: 60
third_party_settings: { }
weight: 26
region: content
su_site_dropdowns:
type: boolean
label: above
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 1e49df54-32d6-4f5b-a5ec-e16691ef2bd4
langcode: en
status: true
dependencies:
config:
- config_pages.type.stanford_basic_site_settings
- field.storage.config_pages.su_site_created
id: config_pages.stanford_basic_site_settings.su_site_created
field_name: su_site_created
entity_type: config_pages
bundle: stanford_basic_site_settings
label: 'Site Created'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: timestamp
18 changes: 18 additions & 0 deletions config/sync/field.storage.config_pages.su_site_created.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
uuid: fe6fd938-d6ff-4a78-afc2-07bb6d493e5b
langcode: en
status: true
dependencies:
module:
- config_pages
id: config_pages.su_site_created
field_name: su_site_created
entity_type: config_pages
type: timestamp
settings: { }
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
4 changes: 3 additions & 1 deletion src/Plugin/InstallTask/SiteSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition
*/
public function runTask(array &$install_state) {
$this->state->set('nobots', FALSE);
$this->state->set('stanford-created', time());

$node_pages = [
'403_page' => '4b8018dc-49a6-4018-9c54-e8c3e462beee',
Expand Down Expand Up @@ -138,9 +139,10 @@ public function runTask(array &$install_state) {
->create([
'type' => 'stanford_basic_site_settings',
'context' => 'a:0:{}',
'su_hide_ext_link_icons' => TRUE,
]);
}
$config_page->set('su_hide_ext_link_icons', TRUE);
$config_page->set('su_site_created', time());
$config_page->set('su_site_email', $site_data['email']);
$config_page->set('su_site_name', $site_data['webSiteTitle']);
$config_page->save();
Expand Down
2 changes: 1 addition & 1 deletion stanford_profile.info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Stanford Profile'
description: 'Jumpstart Website Profile'
version: 11.4.4
version: 11.4.5
type: profile
project: Stanford
core_version_requirement: ^10 || ^11
Expand Down
26 changes: 26 additions & 0 deletions tests/src/Kernel/Plugin/InstallTask/SiteSettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,32 @@ public function setup(): void {
'label' => 'Name',
])->save();

$field_storage = FieldStorageConfig::create([
'field_name' => 'su_hide_ext_link_icons',
'entity_type' => 'config_pages',
'type' => 'boolean',
]);
$field_storage->save();
FieldConfig::create([
'entity_type' => 'config_pages',
'field_storage' => $field_storage,
'bundle' => 'stanford_basic_site_settings',
'label' => 'Hide Ext Links',
])->save();

$field_storage = FieldStorageConfig::create([
'field_name' => 'su_site_created',
'entity_type' => 'config_pages',
'type' => 'timestamp',
]);
$field_storage->save();
FieldConfig::create([
'entity_type' => 'config_pages',
'field_storage' => $field_storage,
'bundle' => 'stanford_basic_site_settings',
'label' => 'Created',
])->save();

drupal_flush_all_caches();

$data = json_encode([
Expand Down

0 comments on commit 5fec035

Please sign in to comment.