updated application.main.form Component, updated Drupal entities, added criteriaList view yml file

parent 6533b766
......@@ -24,7 +24,7 @@ epal_auth_test:
_user_is_logged_in: 'TRUE'
current_user:
path: '/epal/curuser'
options:
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\CurrentUser::content'
......@@ -32,10 +32,9 @@ current_user:
_user_is_logged_in: 'TRUE'
epal.application_submit:
path: '/epal/appsubmit'
options:
options:
_auth: [ 'basic_auth' ]
defaults:
_controller: '\Drupal\epal\Controller\ApplicationSubmit::appSubmit'
requirements:
_user_is_logged_in: 'TRUE'
......@@ -192,8 +192,8 @@ class EpalClassLimits extends ContentEntityBase implements EpalClassLimitsInterf
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['category'] = BaseFieldDefinition::create('string')
$fields['category'] = BaseFieldDefinition::create('string')
->setLabel(t('Κατηγορία σύμφωνα με την περιοχή μετάθεσης'))
->setDescription(t('Κατηγορία σύμφωνα με την περιοχή μετάθεσης.'))
->setSettings(array(
......@@ -212,7 +212,7 @@ class EpalClassLimits extends ContentEntityBase implements EpalClassLimitsInterf
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['limit_down'] = BaseFieldDefinition::create('integer')
->setLabel(t('Κατώτατο όριο μαθητών'))
->setDescription(t('Κατώτατο όριο μαθητών.'))
......@@ -232,7 +232,7 @@ class EpalClassLimits extends ContentEntityBase implements EpalClassLimitsInterf
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['limit_up'] = BaseFieldDefinition::create('integer')
->setLabel(t('Ανώτατο όριο μαθητών'))
->setDescription(t('Ανώτατο όριο μαθητών.'))
......
......@@ -228,6 +228,26 @@ class EpalCriteria extends ContentEntityBase implements EpalCriteriaInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['mutual_disabled_id'] = BaseFieldDefinition::create('integer')
->setLabel(t('Id αμοιβαία αποκλειόμενου κριτηρίου'))
->setDescription(t('Id αμοιβαία αποκλειόμενου κριτηρίου.'))
->setSettings(array(
'max_length' => 2,
'text_processing' => 0,
))
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'integer',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Publishing status'))
......
langcode: el
status: true
dependencies:
config:
- user.role.administrator
- user.role.applicant
- user.role.authenticated
module:
- basic_auth
- epal
- hal
- rest
- serialization
- user
id: criterialist
label: criteriaList
module: views
description: ''
tag: ''
base_table: epal_criteria
base_field: id
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: role
options:
role:
authenticated: authenticated
administrator: administrator
applicant: applicant
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: serializer
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields:
id:
id: id
table: epal_criteria
field: id
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: epal_criteria
entity_field: id
plugin_id: field
name:
table: epal_criteria
field: name
id: name
entity_type: null
entity_field: name
plugin_id: field
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
mutual_disabled_id:
id: mutual_disabled_id
table: epal_criteria
field: mutual_disabled_id
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: epal_criteria
entity_field: mutual_disabled_id
plugin_id: field
filters: { }
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
- url.query_args
- user.roles
tags: { }
rest_export_1:
display_plugin: rest_export
id: rest_export_1
display_title: 'REST export'
position: 1
display_options:
display_extenders: { }
path: criteria/list
pager:
type: some
options:
items_per_page: 0
offset: 0
style:
type: serializer
options:
uses_fields: false
formats:
hal_json: hal_json
json: json
row:
type: data_field
options:
field_options:
id:
alias: ''
raw_output: true
name:
alias: ''
raw_output: true
mutual_disabled_id:
alias: ''
raw_output: true
auth:
- basic_auth
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- request_format
- user.roles
tags: { }
......@@ -215,7 +215,7 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['registry_no'] = BaseFieldDefinition::create('string')
->setLabel(t('Κωδικός Σχολείου'))
->setDescription(t('Δώσε τον Κωδικό Σχολείου'))
......@@ -255,7 +255,27 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['unit_type_id'] = BaseFieldDefinition::create('integer')
->setLabel(t('Id τύπου σχολείου'))
->setDescription(t('Δώσε το Id τύπου σχολείου.'))
->setSettings(array(
'max_length' => 2,
'text_processing' => 0,
))
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'integer',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['street_address'] = BaseFieldDefinition::create('string')
->setLabel(t('Διεύθυνση'))
->setDescription(t('Δώσε την Διεύθυνση Σχολείου'))
......@@ -315,7 +335,7 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['phone_number'] = BaseFieldDefinition::create('string')
->setLabel(t('Τηλέφωνο Σχολείου'))
->setDescription(t('Δώσε το Τηλέφωνο Σχολείου'))
......@@ -379,7 +399,7 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['edu_admin_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('ID Διεύθυνσης Εκπαίδευσης'))
->setDescription(t('Δώσε το ID της Διεύθυνσης Εκπαίδευσης στην οποία ανήκει.'))
......@@ -403,7 +423,7 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['prefecture_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('ID Νομαρχίας'))
->setDescription(t('Δώσε το ID της Νομαρχίας στην οποία ανήκει.'))
......@@ -427,7 +447,7 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['municipality'] = BaseFieldDefinition::create('string')
->setLabel(t('Δήμος-Περιοχή Σχολείου'))
->setDescription(t('Δώσε το Δήμο-Περιοχή Σχολείου'))
......@@ -447,7 +467,7 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['operation_shift'] = BaseFieldDefinition::create('string')
->setLabel(t('Τύπος Σχολείου με βάση το ωράριο λειτουργίας'))
->setDescription(t('Δώσε τον τύπο σχολείου με βάση το ωράριο λειτουργίας-πχ Ημερήσιο'))
......@@ -467,7 +487,7 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['metathesis_region'] = BaseFieldDefinition::create('string')
->setLabel(t('Περιοχή Μετάθεσης Σχολείου'))
->setDescription(t('Δώσε την περιοχή μετάθεσης σχολείου'))
......@@ -487,9 +507,47 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
$fields['capacity_class_a'] = BaseFieldDefinition::create('integer')
->setLabel(t('Μέγιστος αριθμός τμημάτων γενικής παιδείας για την Α Λυκείου'))
->setDescription(t('Δώσε τον μέγιστο αριθμό τμημάτων γενικής παιδείας για την Α Λυκείου.'))
->setSettings(array(
'max_length' => 2,
'text_processing' => 0,
))
->setRequired(false)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'integer',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['special_case'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Ειδική περίπτωση'))
->setDescription(t('Ειδική περίπτωση όσον αφορά τον αριθμό επιλογών.'))
->setSettings(array(
'text_processing' => 0,
))
->setRequired(false)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'boolean',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'boolean',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Publishing status'))
->setDescription(t('A boolean indicating whether the Eepal school is published.'))
->setDefaultValue(TRUE);
......
......@@ -183,7 +183,7 @@ class EepalSectors extends ContentEntityBase implements EepalSectorsInterface {
'max_length' => 100,
'text_processing' => 0,
))
->setDefaultValue('')
->setRequired(true)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
......
......@@ -219,7 +219,7 @@ class EepalSectorsInEpal extends ContentEntityBase implements EepalSectorsInEpal
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['sector_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Τομέας επιλογής'))
->setDescription(t('Τομέας επιλογής.'))
......@@ -243,8 +243,28 @@ class EepalSectorsInEpal extends ContentEntityBase implements EepalSectorsInEpal
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
$fields['capacity_class_sector'] = BaseFieldDefinition::create('integer')
->setLabel(t('Μέγιστος αριθμός τμημάτων τομέα για την Β Λυκείου'))
->setDescription(t('Δώσε τον μέγιστο αριθμό τμημάτων τομέα για την Β Λυκείου.'))
->setSettings(array(
'max_length' => 2,
'text_processing' => 0,
))
->setRequired(false)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'integer',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Publishing status'))
->setDescription(t('A boolean indicating whether the Eepal sectors in epal is published.'))
->setDefaultValue(TRUE);
......
......@@ -219,7 +219,7 @@ class EepalSpecialtiesInEpal extends ContentEntityBase implements EepalSpecialti
))
->setDisplayConfigurable('form', TRUE)