Compare commits
	
		
			1 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| f8930f9fc2 | 
@@ -25,7 +25,6 @@
 | 
				
			|||||||
        "drupal/ckeditor_iframe": "^3.0@alpha",
 | 
					        "drupal/ckeditor_iframe": "^3.0@alpha",
 | 
				
			||||||
        "drupal/config_ignore": "^3.2",
 | 
					        "drupal/config_ignore": "^3.2",
 | 
				
			||||||
        "drupal/config_update": "^2.0@alpha",
 | 
					        "drupal/config_update": "^2.0@alpha",
 | 
				
			||||||
        "drupal/content_entity_clone": "^1.1",
 | 
					 | 
				
			||||||
        "drupal/context": "^5.0@RC",
 | 
					        "drupal/context": "^5.0@RC",
 | 
				
			||||||
        "drupal/core-composer-scaffold": "^10.3",
 | 
					        "drupal/core-composer-scaffold": "^10.3",
 | 
				
			||||||
        "drupal/core-project-message": "^10.3",
 | 
					        "drupal/core-project-message": "^10.3",
 | 
				
			||||||
@@ -39,7 +38,7 @@
 | 
				
			|||||||
        "drupal/geofield": "^1.22",
 | 
					        "drupal/geofield": "^1.22",
 | 
				
			||||||
        "drupal/hreflang": "^1.9",
 | 
					        "drupal/hreflang": "^1.9",
 | 
				
			||||||
        "drupal/iframe": "^3.0",
 | 
					        "drupal/iframe": "^3.0",
 | 
				
			||||||
        "drupal/image_field_caption": "^3.0",
 | 
					        "drupal/image_field_caption": "^2.0",
 | 
				
			||||||
        "drupal/imce": "^3.0",
 | 
					        "drupal/imce": "^3.0",
 | 
				
			||||||
        "drupal/inline_entity_form": "^3.0@RC",
 | 
					        "drupal/inline_entity_form": "^3.0@RC",
 | 
				
			||||||
        "drupal/jquery_ui_button": "^2.1",
 | 
					        "drupal/jquery_ui_button": "^2.1",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										515
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										515
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,31 +0,0 @@
 | 
				
			|||||||
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
 | 
					 | 
				
			||||||
@@ -1,41 +0,0 @@
 | 
				
			|||||||
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
 | 
					 | 
				
			||||||
@@ -1,43 +0,0 @@
 | 
				
			|||||||
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,7 +28,6 @@ module:
 | 
				
			|||||||
  config_translation: 0
 | 
					  config_translation: 0
 | 
				
			||||||
  config_update: 0
 | 
					  config_update: 0
 | 
				
			||||||
  contact: 0
 | 
					  contact: 0
 | 
				
			||||||
  content_entity_clone: 0
 | 
					 | 
				
			||||||
  content_lock: 0
 | 
					  content_lock: 0
 | 
				
			||||||
  content_lock_timeout: 0
 | 
					  content_lock_timeout: 0
 | 
				
			||||||
  context: 0
 | 
					  context: 0
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,4 +2,3 @@ _core:
 | 
				
			|||||||
  default_config_hash: 5P0QjCOMc-OzCEJUXsMfJWVEj_K97A4OFOhGqnb5Seg
 | 
					  default_config_hash: 5P0QjCOMc-OzCEJUXsMfJWVEj_K97A4OFOhGqnb5Seg
 | 
				
			||||||
geocoder_presave_disabled: false
 | 
					geocoder_presave_disabled: false
 | 
				
			||||||
cache: true
 | 
					cache: true
 | 
				
			||||||
queue: false
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,6 @@ dependencies:
 | 
				
			|||||||
  module:
 | 
					  module:
 | 
				
			||||||
    - actions_permissions
 | 
					    - actions_permissions
 | 
				
			||||||
    - administerusersbyrole
 | 
					    - administerusersbyrole
 | 
				
			||||||
    - content_entity_clone
 | 
					 | 
				
			||||||
    - content_lock
 | 
					    - content_lock
 | 
				
			||||||
    - content_translation
 | 
					    - content_translation
 | 
				
			||||||
    - field_ui
 | 
					    - field_ui
 | 
				
			||||||
@@ -63,7 +62,6 @@ permissions:
 | 
				
			|||||||
  - 'bypass node access'
 | 
					  - 'bypass node access'
 | 
				
			||||||
  - 'cancel users with role editeur'
 | 
					  - 'cancel users with role editeur'
 | 
				
			||||||
  - 'change own username'
 | 
					  - 'change own username'
 | 
				
			||||||
  - 'clone content entities'
 | 
					 | 
				
			||||||
  - 'create actualite content'
 | 
					  - 'create actualite content'
 | 
				
			||||||
  - 'create content translations'
 | 
					  - 'create content translations'
 | 
				
			||||||
  - 'create evenement content'
 | 
					  - 'create evenement content'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,6 @@ dependencies:
 | 
				
			|||||||
    - taxonomy.vocabulary.types_de_theme
 | 
					    - taxonomy.vocabulary.types_de_theme
 | 
				
			||||||
    - taxonomy.vocabulary.villes
 | 
					    - taxonomy.vocabulary.villes
 | 
				
			||||||
  module:
 | 
					  module:
 | 
				
			||||||
    - content_entity_clone
 | 
					 | 
				
			||||||
    - content_lock
 | 
					    - content_lock
 | 
				
			||||||
    - file
 | 
					    - file
 | 
				
			||||||
    - file_delete
 | 
					    - file_delete
 | 
				
			||||||
@@ -43,7 +42,6 @@ permissions:
 | 
				
			|||||||
  - 'administer nodes'
 | 
					  - 'administer nodes'
 | 
				
			||||||
  - 'break content lock'
 | 
					  - 'break content lock'
 | 
				
			||||||
  - 'change own username'
 | 
					  - 'change own username'
 | 
				
			||||||
  - 'clone content entities'
 | 
					 | 
				
			||||||
  - 'create actualite content'
 | 
					  - 'create actualite content'
 | 
				
			||||||
  - 'create evenement content'
 | 
					  - 'create evenement content'
 | 
				
			||||||
  - 'create programme content'
 | 
					  - 'create programme content'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,8 +92,7 @@ display:
 | 
				
			|||||||
          buttons: false
 | 
					          buttons: false
 | 
				
			||||||
          action_title: Action
 | 
					          action_title: Action
 | 
				
			||||||
          clear_on_exposed: true
 | 
					          clear_on_exposed: true
 | 
				
			||||||
          show_multipage_selection_box: default
 | 
					          force_selection_info: false
 | 
				
			||||||
          show_select_all: default
 | 
					 | 
				
			||||||
          selected_actions:
 | 
					          selected_actions:
 | 
				
			||||||
            0:
 | 
					            0:
 | 
				
			||||||
              action_id: 'entity:break_lock:taxonomy_term'
 | 
					              action_id: 'entity:break_lock:taxonomy_term'
 | 
				
			||||||
@@ -1142,8 +1141,7 @@ display:
 | 
				
			|||||||
          buttons: false
 | 
					          buttons: false
 | 
				
			||||||
          action_title: Action
 | 
					          action_title: Action
 | 
				
			||||||
          clear_on_exposed: true
 | 
					          clear_on_exposed: true
 | 
				
			||||||
          show_multipage_selection_box: default
 | 
					          force_selection_info: false
 | 
				
			||||||
          show_select_all: default
 | 
					 | 
				
			||||||
          selected_actions:
 | 
					          selected_actions:
 | 
				
			||||||
            0:
 | 
					            0:
 | 
				
			||||||
              action_id: 'entity:break_lock:taxonomy_term'
 | 
					              action_id: 'entity:break_lock:taxonomy_term'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					views.field.view_computed_date_unique:
 | 
				
			||||||
 | 
					  type: views_field
 | 
				
			||||||
 | 
					  label: 'Computed Date Unique'
 | 
				
			||||||
@@ -0,0 +1,52 @@
 | 
				
			|||||||
 | 
					<?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);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					<?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: 18492b8a02...71db21a573
									
								
							
		Reference in New Issue
	
	Block a user