Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e8dfb0fc2 | |||
| 887cbe072f | |||
| 44806913cf | |||
| 492c62b3bf |
@@ -25,6 +25,7 @@
|
||||
"drupal/ckeditor_iframe": "^3.0@alpha",
|
||||
"drupal/config_ignore": "^3.2",
|
||||
"drupal/config_update": "^2.0@alpha",
|
||||
"drupal/content_entity_clone": "^1.1",
|
||||
"drupal/context": "^5.0@RC",
|
||||
"drupal/core-composer-scaffold": "^10.3",
|
||||
"drupal/core-project-message": "^10.3",
|
||||
@@ -38,7 +39,7 @@
|
||||
"drupal/geofield": "^1.22",
|
||||
"drupal/hreflang": "^1.9",
|
||||
"drupal/iframe": "^3.0",
|
||||
"drupal/image_field_caption": "^2.0",
|
||||
"drupal/image_field_caption": "^3.0",
|
||||
"drupal/imce": "^3.0",
|
||||
"drupal/inline_entity_form": "^3.0@RC",
|
||||
"drupal/jquery_ui_button": "^2.1",
|
||||
|
||||
515
composer.lock
generated
515
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
enabled: true
|
||||
local_task_label: Cloner
|
||||
fields:
|
||||
title:
|
||||
id: entity_label_clone_suffix
|
||||
body:
|
||||
id: copy_values
|
||||
field_dates_actu:
|
||||
id: copy_values
|
||||
field_evenements_lies:
|
||||
id: copy_values
|
||||
field_fichier:
|
||||
id: copy_values
|
||||
field_image:
|
||||
id: copy_values
|
||||
field_lien:
|
||||
id: copy_values
|
||||
field_memo:
|
||||
id: copy_values
|
||||
field_programme:
|
||||
id: copy_values
|
||||
field_projet:
|
||||
id: copy_values
|
||||
field_promu_en_page_programme:
|
||||
id: copy_values
|
||||
field_ressources_liees:
|
||||
id: copy_values
|
||||
field_sous_titre:
|
||||
id: copy_values
|
||||
field_theme:
|
||||
id: copy_values
|
||||
@@ -0,0 +1,41 @@
|
||||
enabled: true
|
||||
local_task_label: Cloner
|
||||
fields:
|
||||
title:
|
||||
id: entity_label_clone_suffix
|
||||
body:
|
||||
id: copy_values
|
||||
field_date:
|
||||
id: copy_values
|
||||
field_evenements_lies:
|
||||
id: copy_values
|
||||
field_fichier:
|
||||
id: copy_values
|
||||
field_image:
|
||||
id: copy_values
|
||||
field_intro:
|
||||
id: copy_values
|
||||
field_last_date_only:
|
||||
id: copy_values
|
||||
field_lien:
|
||||
id: copy_values
|
||||
field_memo:
|
||||
id: copy_values
|
||||
field_organisateur:
|
||||
id: copy_values
|
||||
field_partenaires:
|
||||
id: copy_values
|
||||
field_programme:
|
||||
id: copy_values
|
||||
field_projet:
|
||||
id: copy_values
|
||||
field_promu_en_page_programme:
|
||||
id: copy_values
|
||||
field_ressources_liees:
|
||||
id: copy_values
|
||||
field_sous_titre:
|
||||
id: copy_values
|
||||
field_theme:
|
||||
id: copy_values
|
||||
field_type_evenement:
|
||||
id: copy_values
|
||||
@@ -0,0 +1,43 @@
|
||||
enabled: true
|
||||
local_task_label: Cloner
|
||||
fields:
|
||||
title:
|
||||
id: entity_label_clone_suffix
|
||||
body:
|
||||
id: copy_values
|
||||
field_auteurs:
|
||||
id: copy_values
|
||||
field_collections:
|
||||
id: copy_values
|
||||
field_date_de_parution:
|
||||
id: copy_values
|
||||
field_diaporama:
|
||||
id: copy_values
|
||||
field_edition:
|
||||
id: copy_values
|
||||
field_evenements_lies:
|
||||
id: copy_values
|
||||
field_fichier:
|
||||
id: copy_values
|
||||
field_image:
|
||||
id: copy_values
|
||||
field_lien:
|
||||
id: copy_values
|
||||
field_memo:
|
||||
id: copy_values
|
||||
field_poid:
|
||||
id: copy_values
|
||||
field_programme:
|
||||
id: copy_values
|
||||
field_projet:
|
||||
id: copy_values
|
||||
field_ressources_liees:
|
||||
id: copy_values
|
||||
field_sous_titre:
|
||||
id: copy_values
|
||||
field_theme:
|
||||
id: copy_values
|
||||
field_type_de_ressource:
|
||||
id: copy_values
|
||||
field_videos:
|
||||
id: copy_values
|
||||
@@ -28,6 +28,7 @@ module:
|
||||
config_translation: 0
|
||||
config_update: 0
|
||||
contact: 0
|
||||
content_entity_clone: 0
|
||||
content_lock: 0
|
||||
content_lock_timeout: 0
|
||||
context: 0
|
||||
|
||||
@@ -2,3 +2,4 @@ _core:
|
||||
default_config_hash: 5P0QjCOMc-OzCEJUXsMfJWVEj_K97A4OFOhGqnb5Seg
|
||||
geocoder_presave_disabled: false
|
||||
cache: true
|
||||
queue: false
|
||||
|
||||
@@ -20,6 +20,7 @@ dependencies:
|
||||
module:
|
||||
- actions_permissions
|
||||
- administerusersbyrole
|
||||
- content_entity_clone
|
||||
- content_lock
|
||||
- content_translation
|
||||
- field_ui
|
||||
@@ -62,6 +63,7 @@ permissions:
|
||||
- 'bypass node access'
|
||||
- 'cancel users with role editeur'
|
||||
- 'change own username'
|
||||
- 'clone content entities'
|
||||
- 'create actualite content'
|
||||
- 'create content translations'
|
||||
- 'create evenement content'
|
||||
|
||||
@@ -18,6 +18,7 @@ dependencies:
|
||||
- taxonomy.vocabulary.types_de_theme
|
||||
- taxonomy.vocabulary.villes
|
||||
module:
|
||||
- content_entity_clone
|
||||
- content_lock
|
||||
- file
|
||||
- file_delete
|
||||
@@ -42,6 +43,7 @@ permissions:
|
||||
- 'administer nodes'
|
||||
- 'break content lock'
|
||||
- 'change own username'
|
||||
- 'clone content entities'
|
||||
- 'create actualite content'
|
||||
- 'create evenement content'
|
||||
- 'create programme content'
|
||||
|
||||
@@ -92,7 +92,8 @@ display:
|
||||
buttons: false
|
||||
action_title: Action
|
||||
clear_on_exposed: true
|
||||
force_selection_info: false
|
||||
show_multipage_selection_box: default
|
||||
show_select_all: default
|
||||
selected_actions:
|
||||
0:
|
||||
action_id: 'entity:break_lock:taxonomy_term'
|
||||
@@ -1141,7 +1142,8 @@ display:
|
||||
buttons: false
|
||||
action_title: Action
|
||||
clear_on_exposed: true
|
||||
force_selection_info: false
|
||||
show_multipage_selection_box: default
|
||||
show_select_all: default
|
||||
selected_actions:
|
||||
0:
|
||||
action_id: 'entity:break_lock:taxonomy_term'
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
views.field.view_computed_date_unique:
|
||||
type: views_field
|
||||
label: 'Computed Date Unique'
|
||||
@@ -1,52 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\popsu_uniqdate\Plugin\Field\FieldType;
|
||||
|
||||
use Drupal\Core\Entity\FieldableEntityInterface;
|
||||
// use Drupal\Core\Field\EntityReferenceFieldItemList;
|
||||
// use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
|
||||
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItem;
|
||||
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
|
||||
use Drupal\datetime\Plugin\Field\FieldType\DateTimeFieldItemList;
|
||||
use Drupal\Core\Field\FieldItemList;
|
||||
use Drupal\Core\TypedData\TypedDataInterface;
|
||||
use Drupal\Core\Field\BaseFieldDefinition;
|
||||
use Drupal\Core\TypedData\ComputedItemListTrait;
|
||||
|
||||
// https://www.drupal.org/node/2112677
|
||||
// https://www.cornel.co/article/entity-reference-computed-field-example-drupal
|
||||
// https://www.caxy.com/blog/drupal-custom-form-and-computed-fields
|
||||
|
||||
class ComputedUniqDate extends DateTimeFieldItemList
|
||||
{
|
||||
use ComputedItemListTrait;
|
||||
|
||||
/**
|
||||
* The entity type manager.
|
||||
*
|
||||
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
|
||||
*/
|
||||
protected $entityTypeManager;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(BaseFieldDefinition $definition, $name, TypedDataInterface $parent) {
|
||||
parent::__construct($definition, $name, $parent);
|
||||
$this->entityTypeManager = \Drupal::entityTypeManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the values.
|
||||
*/
|
||||
protected function computeValue() {
|
||||
// $query = \Drupal::entityQuery('node')
|
||||
$entity = $this->getEntity();
|
||||
// $storage = \Drupal::service('entity_type.manager')->getStorage('node');
|
||||
$dates = $entity->get('field_date')->getValue();
|
||||
asort($dates);
|
||||
$last_date = array_pop($dates);
|
||||
$this->list[0] = $this->createItem(0, $last_date);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\popsu_uniqdate\Plugin\views\field;
|
||||
|
||||
use Drupal\views\ResultRow;
|
||||
use Drupal\views\Plugin\views\field\FieldPluginBase;
|
||||
|
||||
/**
|
||||
* A handler to provide proper displays for profile current company.
|
||||
*
|
||||
* @ingroup views_field_handlers
|
||||
*
|
||||
* @ViewsField("views_computed_date_unique")
|
||||
*/
|
||||
class ViewsComputedDateUnique extends FieldPluginBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function render(ResultRow $values) {
|
||||
$entity = $values->_entity;
|
||||
$uniqdate = $entity->get('computed_date_unique')->getValue();
|
||||
return $uniqdate[0]['value'];
|
||||
// $dates = $entity->get('field_date')->getvalue();
|
||||
// asort($dates);
|
||||
// return array_pop($dates);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function query() {
|
||||
// This function exists to override parent query function.
|
||||
// Do nothing.
|
||||
}
|
||||
}
|
||||
Submodule web/profiles/d8-starterkit-profile updated: 71db21a573...18492b8a02
Reference in New Issue
Block a user