Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Σταύρος Παπαδάκης
e-epal
Commits
2fb612e0
Commit
2fb612e0
authored
Jan 20, 2017
by
Χάρης Παπαδόπουλος
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'epal' into 'develop'
Application Form - stage 3 See merge request !7
parents
c160894c
eece7ff2
Changes
65
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
65 changed files
with
4939 additions
and
43 deletions
+4939
-43
drupal/modules/epal/epal.info.yml
drupal/modules/epal/epal.info.yml
+1
-1
drupal/modules/epal/epal.links.action.yml
drupal/modules/epal/epal.links.action.yml
+15
-0
drupal/modules/epal/epal.links.menu.yml
drupal/modules/epal/epal.links.menu.yml
+42
-0
drupal/modules/epal/epal.links.task.yml
drupal/modules/epal/epal.links.task.yml
+66
-0
drupal/modules/epal/epal.permissions.yml
drupal/modules/epal/epal.permissions.yml
+66
-0
drupal/modules/epal/epal_module_description.md
drupal/modules/epal/epal_module_description.md
+526
-0
drupal/modules/epal/epal_student_course_field.page.inc
drupal/modules/epal/epal_student_course_field.page.inc
+30
-0
drupal/modules/epal/epal_student_epal_chosen.page.inc
drupal/modules/epal/epal_student_epal_chosen.page.inc
+30
-0
drupal/modules/epal/epal_users.page.inc
drupal/modules/epal/epal_users.page.inc
+30
-0
drupal/modules/epal/src/Entity/EpalStudent.php
drupal/modules/epal/src/Entity/EpalStudent.php
+254
-37
drupal/modules/epal/src/Entity/EpalStudentCourseField.php
drupal/modules/epal/src/Entity/EpalStudentCourseField.php
+264
-0
drupal/modules/epal/src/Entity/EpalStudentCourseFieldInterface.php
...dules/epal/src/Entity/EpalStudentCourseFieldInterface.php
+77
-0
drupal/modules/epal/src/Entity/EpalStudentCourseFieldViewsData.php
...dules/epal/src/Entity/EpalStudentCourseFieldViewsData.php
+24
-0
drupal/modules/epal/src/Entity/EpalStudentEpalChosen.php
drupal/modules/epal/src/Entity/EpalStudentEpalChosen.php
+393
-0
drupal/modules/epal/src/Entity/EpalStudentEpalChosenInterface.php
...odules/epal/src/Entity/EpalStudentEpalChosenInterface.php
+77
-0
drupal/modules/epal/src/Entity/EpalStudentEpalChosenViewsData.php
...odules/epal/src/Entity/EpalStudentEpalChosenViewsData.php
+24
-0
drupal/modules/epal/src/Entity/EpalUsers.php
drupal/modules/epal/src/Entity/EpalUsers.php
+490
-0
drupal/modules/epal/src/Entity/EpalUsersInterface.php
drupal/modules/epal/src/Entity/EpalUsersInterface.php
+77
-0
drupal/modules/epal/src/Entity/EpalUsersViewsData.php
drupal/modules/epal/src/Entity/EpalUsersViewsData.php
+24
-0
drupal/modules/epal/src/EpalStudentCourseFieldAccessControlHandler.php
...s/epal/src/EpalStudentCourseFieldAccessControlHandler.php
+47
-0
drupal/modules/epal/src/EpalStudentCourseFieldHtmlRouteProvider.php
...ules/epal/src/EpalStudentCourseFieldHtmlRouteProvider.php
+85
-0
drupal/modules/epal/src/EpalStudentCourseFieldListBuilder.php
...al/modules/epal/src/EpalStudentCourseFieldListBuilder.php
+45
-0
drupal/modules/epal/src/EpalStudentCourseFieldTranslationHandler.php
...les/epal/src/EpalStudentCourseFieldTranslationHandler.php
+14
-0
drupal/modules/epal/src/EpalStudentEpalChosenAccessControlHandler.php
...es/epal/src/EpalStudentEpalChosenAccessControlHandler.php
+47
-0
drupal/modules/epal/src/EpalStudentEpalChosenHtmlRouteProvider.php
...dules/epal/src/EpalStudentEpalChosenHtmlRouteProvider.php
+85
-0
drupal/modules/epal/src/EpalStudentEpalChosenListBuilder.php
drupal/modules/epal/src/EpalStudentEpalChosenListBuilder.php
+45
-0
drupal/modules/epal/src/EpalStudentEpalChosenTranslationHandler.php
...ules/epal/src/EpalStudentEpalChosenTranslationHandler.php
+14
-0
drupal/modules/epal/src/EpalUsersAccessControlHandler.php
drupal/modules/epal/src/EpalUsersAccessControlHandler.php
+47
-0
drupal/modules/epal/src/EpalUsersHtmlRouteProvider.php
drupal/modules/epal/src/EpalUsersHtmlRouteProvider.php
+85
-0
drupal/modules/epal/src/EpalUsersListBuilder.php
drupal/modules/epal/src/EpalUsersListBuilder.php
+45
-0
drupal/modules/epal/src/EpalUsersTranslationHandler.php
drupal/modules/epal/src/EpalUsersTranslationHandler.php
+14
-0
drupal/modules/epal/src/Form/EpalStudentCourseFieldDeleteForm.php
...odules/epal/src/Form/EpalStudentCourseFieldDeleteForm.php
+15
-0
drupal/modules/epal/src/Form/EpalStudentCourseFieldForm.php
drupal/modules/epal/src/Form/EpalStudentCourseFieldForm.php
+50
-0
drupal/modules/epal/src/Form/EpalStudentCourseFieldSettingsForm.php
...ules/epal/src/Form/EpalStudentCourseFieldSettingsForm.php
+55
-0
drupal/modules/epal/src/Form/EpalStudentEpalChosenDeleteForm.php
...modules/epal/src/Form/EpalStudentEpalChosenDeleteForm.php
+15
-0
drupal/modules/epal/src/Form/EpalStudentEpalChosenForm.php
drupal/modules/epal/src/Form/EpalStudentEpalChosenForm.php
+50
-0
drupal/modules/epal/src/Form/EpalStudentEpalChosenSettingsForm.php
...dules/epal/src/Form/EpalStudentEpalChosenSettingsForm.php
+55
-0
drupal/modules/epal/src/Form/EpalUsersDeleteForm.php
drupal/modules/epal/src/Form/EpalUsersDeleteForm.php
+15
-0
drupal/modules/epal/src/Form/EpalUsersForm.php
drupal/modules/epal/src/Form/EpalUsersForm.php
+50
-0
drupal/modules/epal/src/Form/EpalUsersSettingsForm.php
drupal/modules/epal/src/Form/EpalUsersSettingsForm.php
+55
-0
drupal/modules/epal/templates/epal_student_course_field.html.twig
...odules/epal/templates/epal_student_course_field.html.twig
+22
-0
drupal/modules/epal/templates/epal_student_epal_chosen.html.twig
...modules/epal/templates/epal_student_epal_chosen.html.twig
+22
-0
drupal/modules/epal/templates/epal_users.html.twig
drupal/modules/epal/templates/epal_users.html.twig
+22
-0
drupal/modules/epalreadydata/epalreadydata_module_description.md
...modules/epalreadydata/epalreadydata_module_description.md
+526
-0
source/actions/index.ts
source/actions/index.ts
+3
-1
source/actions/studentdatafields.actions.ts
source/actions/studentdatafields.actions.ts
+68
-0
source/app.settings.ts
source/app.settings.ts
+1
-1
source/app.ts
source/app.ts
+2
-0
source/components/form-controls/form3.ts
source/components/form-controls/form3.ts
+5
-2
source/components/student-application-form/TEST_studentData-fields-select.ts
...tudent-application-form/TEST_studentData-fields-select.ts
+317
-0
source/components/student-application-form/course-fields-select.ts
...mponents/student-application-form/course-fields-select.ts
+2
-0
source/components/student-application-form/studentData-fields-select.ts
...nts/student-application-form/studentData-fields-select.ts
+298
-0
source/constants.ts
source/constants.ts
+3
-0
source/containers/forms.css
source/containers/forms.css
+18
-0
source/containers/main.routes.ts
source/containers/main.routes.ts
+7
-1
source/containers/main.ts
source/containers/main.ts
+3
-0
source/index.html
source/index.html
+1
-0
source/services/user-data-service.ts
source/services/user-data-service.ts
+66
-0
source/store/index.ts
source/store/index.ts
+3
-0
source/store/store.ts
source/store/store.ts
+4
-0
source/store/studentdatafields/index.ts
source/store/studentdatafields/index.ts
+10
-0
source/store/studentdatafields/studentdatafields.initial-state.ts
...tore/studentdatafields/studentdatafields.initial-state.ts
+5
-0
source/store/studentdatafields/studentdatafields.reducer.ts
source/store/studentdatafields/studentdatafields.reducer.ts
+45
-0
source/store/studentdatafields/studentdatafields.transformers.ts
...store/studentdatafields/studentdatafields.transformers.ts
+20
-0
source/store/studentdatafields/studentdatafields.types.ts
source/store/studentdatafields/studentdatafields.types.ts
+23
-0
No files found.
drupal/modules/epal/epal.info.yml
View file @
2fb612e0
...
...
@@ -2,4 +2,4 @@ name: epal
type
:
module
description
:
EPAL Registration
core
:
8.x
package
:
epal
package
:
EPAL
drupal/modules/epal/epal.links.action.yml
View file @
2fb612e0
...
...
@@ -8,3 +8,18 @@ entity.epal_student_class.add_form:
title
:
'
Add
EPAL
Student
Class'
appears_on
:
-
entity.epal_student_class.collection
entity.epal_student_epal_chosen.add_form
:
route_name
:
entity.epal_student_epal_chosen.add_form
title
:
'
Add
Epal
student
epal
chosen'
appears_on
:
-
entity.epal_student_epal_chosen.collection
entity.epal_student_course_field.add_form
:
route_name
:
entity.epal_student_course_field.add_form
title
:
'
Add
Epal
student
course
field'
appears_on
:
-
entity.epal_student_course_field.collection
entity.epal_users.add_form
:
route_name
:
entity.epal_users.add_form
title
:
'
Add
Epal
users'
appears_on
:
-
entity.epal_users.collection
drupal/modules/epal/epal.links.menu.yml
View file @
2fb612e0
...
...
@@ -26,3 +26,45 @@ epal_student_class.admin.structure.settings:
description
:
'
Configure
EPAL
Student
Class
entities'
route_name
:
epal_student_class.settings
parent
:
system.admin_structure
# Epal student epal chosen menu items definition
entity.epal_student_epal_chosen.collection
:
title
:
'
Epal
student
epal
chosen
list'
route_name
:
entity.epal_student_epal_chosen.collection
description
:
'
List
Epal
student
epal
chosen
entities'
parent
:
system.admin_structure
weight
:
100
epal_student_epal_chosen.admin.structure.settings
:
title
:
Epal student epal chosen settings
description
:
'
Configure
Epal
student
epal
chosen
entities'
route_name
:
epal_student_epal_chosen.settings
parent
:
system.admin_structure
# Epal student course field menu items definition
entity.epal_student_course_field.collection
:
title
:
'
Epal
student
course
field
list'
route_name
:
entity.epal_student_course_field.collection
description
:
'
List
Epal
student
course
field
entities'
parent
:
system.admin_structure
weight
:
100
epal_student_course_field.admin.structure.settings
:
title
:
Epal student course field settings
description
:
'
Configure
Epal
student
course
field
entities'
route_name
:
epal_student_course_field.settings
parent
:
system.admin_structure
# Epal users menu items definition
entity.epal_users.collection
:
title
:
'
Epal
users
list'
route_name
:
entity.epal_users.collection
description
:
'
List
Epal
users
entities'
parent
:
system.admin_structure
weight
:
100
epal_users.admin.structure.settings
:
title
:
Epal users settings
description
:
'
Configure
Epal
users
entities'
route_name
:
epal_users.settings
parent
:
system.admin_structure
drupal/modules/epal/epal.links.task.yml
View file @
2fb612e0
...
...
@@ -42,3 +42,69 @@ entity.epal_student_class.delete_form:
title
:
Delete
weight
:
10
# Epal student epal chosen routing definition
epal_student_epal_chosen.settings_tab
:
route_name
:
epal_student_epal_chosen.settings
title
:
'
Settings'
base_route
:
epal_student_epal_chosen.settings
entity.epal_student_epal_chosen.canonical
:
route_name
:
entity.epal_student_epal_chosen.canonical
base_route
:
entity.epal_student_epal_chosen.canonical
title
:
'
View'
entity.epal_student_epal_chosen.edit_form
:
route_name
:
entity.epal_student_epal_chosen.edit_form
base_route
:
entity.epal_student_epal_chosen.canonical
title
:
'
Edit'
entity.epal_student_epal_chosen.delete_form
:
route_name
:
entity.epal_student_epal_chosen.delete_form
base_route
:
entity.epal_student_epal_chosen.canonical
title
:
Delete
weight
:
10
# Epal student course field routing definition
epal_student_course_field.settings_tab
:
route_name
:
epal_student_course_field.settings
title
:
'
Settings'
base_route
:
epal_student_course_field.settings
entity.epal_student_course_field.canonical
:
route_name
:
entity.epal_student_course_field.canonical
base_route
:
entity.epal_student_course_field.canonical
title
:
'
View'
entity.epal_student_course_field.edit_form
:
route_name
:
entity.epal_student_course_field.edit_form
base_route
:
entity.epal_student_course_field.canonical
title
:
'
Edit'
entity.epal_student_course_field.delete_form
:
route_name
:
entity.epal_student_course_field.delete_form
base_route
:
entity.epal_student_course_field.canonical
title
:
Delete
weight
:
10
# Epal users routing definition
epal_users.settings_tab
:
route_name
:
epal_users.settings
title
:
'
Settings'
base_route
:
epal_users.settings
entity.epal_users.canonical
:
route_name
:
entity.epal_users.canonical
base_route
:
entity.epal_users.canonical
title
:
'
View'
entity.epal_users.edit_form
:
route_name
:
entity.epal_users.edit_form
base_route
:
entity.epal_users.canonical
title
:
'
Edit'
entity.epal_users.delete_form
:
route_name
:
entity.epal_users.delete_form
base_route
:
entity.epal_users.canonical
title
:
Delete
weight
:
10
drupal/modules/epal/epal.permissions.yml
View file @
2fb612e0
...
...
@@ -42,3 +42,69 @@ view published epal student class entities:
view unpublished epal student class entities
:
title
:
'
View
unpublished
EPAL
Student
Class
entities'
add epal student epal chosen entities
:
title
:
'
Create
new
Epal
student
epal
chosen
entities'
administer epal student epal chosen entities
:
title
:
'
Administer
Epal
student
epal
chosen
entities'
description
:
'
Allow
to
access
the
administration
form
to
configure
Epal
student
epal
chosen
entities.'
restrict access
:
true
delete epal student epal chosen entities
:
title
:
'
Delete
Epal
student
epal
chosen
entities'
edit epal student epal chosen entities
:
title
:
'
Edit
Epal
student
epal
chosen
entities'
access epal student epal chosen overview
:
title
:
'
Access
the
Epal
student
epal
chosen
overview
page'
view published epal student epal chosen entities
:
title
:
'
View
published
Epal
student
epal
chosen
entities'
view unpublished epal student epal chosen entities
:
title
:
'
View
unpublished
Epal
student
epal
chosen
entities'
add epal student course field entities
:
title
:
'
Create
new
Epal
student
course
field
entities'
administer epal student course field entities
:
title
:
'
Administer
Epal
student
course
field
entities'
description
:
'
Allow
to
access
the
administration
form
to
configure
Epal
student
course
field
entities.'
restrict access
:
true
delete epal student course field entities
:
title
:
'
Delete
Epal
student
course
field
entities'
edit epal student course field entities
:
title
:
'
Edit
Epal
student
course
field
entities'
access epal student course field overview
:
title
:
'
Access
the
Epal
student
course
field
overview
page'
view published epal student course field entities
:
title
:
'
View
published
Epal
student
course
field
entities'
view unpublished epal student course field entities
:
title
:
'
View
unpublished
Epal
student
course
field
entities'
add epal users entities
:
title
:
'
Create
new
Epal
users
entities'
administer epal users entities
:
title
:
'
Administer
Epal
users
entities'
description
:
'
Allow
to
access
the
administration
form
to
configure
Epal
users
entities.'
restrict access
:
true
delete epal users entities
:
title
:
'
Delete
Epal
users
entities'
edit epal users entities
:
title
:
'
Edit
Epal
users
entities'
access epal users overview
:
title
:
'
Access
the
Epal
users
overview
page'
view published epal users entities
:
title
:
'
View
published
Epal
users
entities'
view unpublished epal users entities
:
title
:
'
View
unpublished
Epal
users
entities'
drupal/modules/epal/epal_module_description.md
0 → 100644
View file @
2fb612e0
This diff is collapsed.
Click to expand it.
drupal/modules/epal/epal_student_course_field.page.inc
0 → 100644
View file @
2fb612e0
<?php
/**
* @file
* Contains epal_student_course_field.page.inc.
*
* Page callback for Epal student course field entities.
*/
use
Drupal\Core\Render\Element
;
/**
* Prepares variables for Epal student course field templates.
*
* Default template: epal_student_course_field.html.twig.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the user information and any
* - attributes: HTML attributes for the containing element.
*/
function
template_preprocess_epal_student_course_field
(
array
&
$variables
)
{
// Fetch EpalStudentCourseField Entity Object.
$epal_student_course_field
=
$variables
[
'elements'
][
'#epal_student_course_field'
];
// Helpful $content variable for templates.
foreach
(
Element
::
children
(
$variables
[
'elements'
])
as
$key
)
{
$variables
[
'content'
][
$key
]
=
$variables
[
'elements'
][
$key
];
}
}
drupal/modules/epal/epal_student_epal_chosen.page.inc
0 → 100644
View file @
2fb612e0
<?php
/**
* @file
* Contains epal_student_epal_chosen.page.inc.
*
* Page callback for Epal student epal chosen entities.
*/
use
Drupal\Core\Render\Element
;
/**
* Prepares variables for Epal student epal chosen templates.
*
* Default template: epal_student_epal_chosen.html.twig.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the user information and any
* - attributes: HTML attributes for the containing element.
*/
function
template_preprocess_epal_student_epal_chosen
(
array
&
$variables
)
{
// Fetch EpalStudentEpalChosen Entity Object.
$epal_student_epal_chosen
=
$variables
[
'elements'
][
'#epal_student_epal_chosen'
];
// Helpful $content variable for templates.
foreach
(
Element
::
children
(
$variables
[
'elements'
])
as
$key
)
{
$variables
[
'content'
][
$key
]
=
$variables
[
'elements'
][
$key
];
}
}
drupal/modules/epal/epal_users.page.inc
0 → 100644
View file @
2fb612e0
<?php
/**
* @file
* Contains epal_users.page.inc.
*
* Page callback for Epal users entities.
*/
use
Drupal\Core\Render\Element
;
/**
* Prepares variables for Epal users templates.
*
* Default template: epal_users.html.twig.
*
* @param array $variables
* An associative array containing:
* - elements: An associative array containing the user information and any
* - attributes: HTML attributes for the containing element.
*/
function
template_preprocess_epal_users
(
array
&
$variables
)
{
// Fetch EpalUsers Entity Object.
$epal_users
=
$variables
[
'elements'
][
'#epal_users'
];
// Helpful $content variable for templates.
foreach
(
Element
::
children
(
$variables
[
'elements'
])
as
$key
)
{
$variables
[
'content'
][
$key
]
=
$variables
[
'elements'
][
$key
];
}
}
drupal/modules/epal/src/Entity/EpalStudent.php
View file @
2fb612e0
...
...
@@ -258,39 +258,33 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'name'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Name'
))
->
setDescription
(
t
(
'The name of the EPAL Student entity.'
))
->
setSettings
(
array
(
'max_length'
=>
50
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
$fields
[
'name'
]
=
BaseFieldDefinition
::
create
(
'entity_reference'
)
->
setLabel
(
t
(
'EpalUsers id'
))
->
setDescription
(
t
(
'Δώσε το id του EpalUsers.'
))
->
setSetting
(
'target_type'
,
'epal_users'
)
->
setSetting
(
'handler'
,
'default'
)
->
setTranslatable
(
TRUE
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'
above
'
,
'type'
=>
'
string
'
,
'weight'
=>
-
4
,
))
'label'
=>
'
hidden
'
,
'type'
=>
'
author
'
,
'weight'
=>
0
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
'type'
=>
'entity_reference_autocomplete'
,
'weight'
=>
5
,
'settings'
=>
array
(
'match_operator'
=>
'CONTAINS'
,
'size'
=>
'60'
,
'autocomplete_type'
=>
'tags'
,
'placeholder'
=>
''
,
),
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'status'
]
=
BaseFieldDefinition
::
create
(
'boolean'
)
->
setLabel
(
t
(
'Publishing status'
))
->
setDescription
(
t
(
'A boolean indicating whether the EPAL Student is published.'
))
->
setDefaultValue
(
TRUE
);
$fields
[
'created'
]
=
BaseFieldDefinition
::
create
(
'created'
)
->
setLabel
(
t
(
'Created'
))
->
setDescription
(
t
(
'The time that the entity was created.'
));
$fields
[
'changed'
]
=
BaseFieldDefinition
::
create
(
'changed'
)
->
setLabel
(
t
(
'Changed'
))
->
setDescription
(
t
(
'The time that the entity was last edited.'
));
/*
$fields['surname'] = BaseFieldDefinition::create('string')
->setLabel(t('Surname'))
->setDescription(t('The surname of the Student entity.'))
...
...
@@ -310,13 +304,34 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
*/
$fields
[
'studentFirstname'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Όνομα μαθητή'
))
->
setDescription
(
t
(
'Δώσε το μικρό μαθητή.'
))
->
setSettings
(
array
(
'max_length'
=>
50
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'
address
'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'
Address
'
))
->
setDescription
(
t
(
'
The address of the Student entity
.'
))
$fields
[
'
studentSurname
'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'
Επώνυμο μαθητή
'
))
->
setDescription
(
t
(
'
Δώσε το επώνυμο μαθητή
.'
))
->
setSettings
(
array
(
'max_length'
=>
25
5
,
'max_length'
=>
5
0
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
...
...
@@ -331,12 +346,13 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'birthdate'
]
=
BaseFieldDefinition
::
create
(
'datetime'
)
->
setLabel
(
t
(
'Birth date'
))
->
setDescription
(
t
(
'The birth date'
))
/*
$fields['birthdate'] = BaseFieldDefinition::create('datetime')
->setLabel(t('Ημερομηνία γέννησης μαθητή'))
->setDescription(t('Δώσε την Ημερομηνία γέννησης μαθητή.'))
->setSetting('datetime_type', 'date')
->
setRequired
(
tru
e
)
->setRequired(
fals
e)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
...
...
@@ -347,7 +363,207 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
*/
$fields
[
'guardianSurname'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Επώνυμο κηδεμόνα'
))
->
setDescription
(
t
(
'Δώσε το επώνυμο του κηδεμόνα.'
))
->
setSettings
(
array
(
'max_length'
=>
50
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'guardianFirstname'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Όνομα του κηδεμόνα'
))
->
setDescription
(
t
(
'Δώσε το όνομα του κηδεμόνα.'
))
->
setSettings
(
array
(
'max_length'
=>
50
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
/*
$fields['guardianADT'] = BaseFieldDefinition::create('string')
->setLabel(t('Ταυτότητα κηδεμόνα'))
->setDescription(t('Δώσε την ταυτότητα κηδεμόνα.'))
->setSettings(array(
'max_length' => 50,
'text_processing' => 0,
))
->setDefaultValue('')
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'string',
'weight' => -4,
))
->setDisplayOptions('form', array(
'type' => 'string_textfield',
'weight' => -4,
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
*/
$fields
[
'studentAmka'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'ΑΜΚΑ μαθητή'
))
->
setDescription
(
t
(
'Δώσε το ΑΜΚΑ μαθητή.'
))
->
setSettings
(
array
(
'max_length'
=>
20
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'regionAddress'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Διεύθνση κηδεμόνα'
))
->
setDescription
(
t
(
'Δώσε τη διεύθυνση κηδεμόνα.'
))
->
setSettings
(
array
(
'max_length'
=>
100
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'regionTK'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'ΤΚ περιοχής'
))
->
setDescription
(
t
(
'Δώσε τον ΤΚ της διεύθυνσης κατοικίας.'
))
->
setSettings
(
array
(
'max_length'
=>
10
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'regionArea'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'Πόλη-Κοινότητα'
))
->
setDescription
(
t
(
'Δώσε την πόλη ή κοινότητα που διαμένεις.'
))
->
setSettings
(
array
(
'max_length'
=>
100
,
'text_processing'
=>
0
,
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'above'
,
'type'
=>
'string'
,
'weight'
=>
-
4
,
))
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'weight'
=>
-
4
,
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);