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
dc44aee5
Commit
dc44aee5
authored
Jan 18, 2017
by
Νίκος Κατσαούνος
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update epal module with new entities
parent
c160894c
Changes
42
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
2983 additions
and
38 deletions
+2983
-38
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_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
No files found.
drupal/modules/epal/epal.info.yml
View file @
dc44aee5
...
@@ -2,4 +2,4 @@ name: epal
...
@@ -2,4 +2,4 @@ name: epal
type
:
module
type
:
module
description
:
EPAL Registration
description
:
EPAL Registration
core
:
8.x
core
:
8.x
package
:
epal
package
:
EPAL
drupal/modules/epal/epal.links.action.yml
View file @
dc44aee5
...
@@ -8,3 +8,18 @@ entity.epal_student_class.add_form:
...
@@ -8,3 +8,18 @@ entity.epal_student_class.add_form:
title
:
'
Add
EPAL
Student
Class'
title
:
'
Add
EPAL
Student
Class'
appears_on
:
appears_on
:
-
entity.epal_student_class.collection
-
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 @
dc44aee5
...
@@ -26,3 +26,45 @@ epal_student_class.admin.structure.settings:
...
@@ -26,3 +26,45 @@ epal_student_class.admin.structure.settings:
description
:
'
Configure
EPAL
Student
Class
entities'
description
:
'
Configure
EPAL
Student
Class
entities'
route_name
:
epal_student_class.settings
route_name
:
epal_student_class.settings
parent
:
system.admin_structure
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 @
dc44aee5
...
@@ -42,3 +42,69 @@ entity.epal_student_class.delete_form:
...
@@ -42,3 +42,69 @@ entity.epal_student_class.delete_form:
title
:
Delete
title
:
Delete
weight
:
10
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 @
dc44aee5
...
@@ -42,3 +42,69 @@ view published epal student class entities:
...
@@ -42,3 +42,69 @@ view published epal student class entities:
view unpublished epal student class entities
:
view unpublished epal student class entities
:
title
:
'
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_student_course_field.page.inc
0 → 100644
View file @
dc44aee5
<?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 @
dc44aee5
<?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 @
dc44aee5
<?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 @
dc44aee5
...
@@ -258,39 +258,33 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
...
@@ -258,39 +258,33 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'name'
]
=
BaseFieldDefinition
::
create
(
'string'
)
$fields
[
'name'
]
=
BaseFieldDefinition
::
create
(
'entity_reference'
)
->
setLabel
(
t
(
'Name'
))
->
setLabel
(
t
(
'EpalUsers id'
))
->
setDescription
(
t
(
'The name of the EPAL Student entity.'
))
->
setDescription
(
t
(
'Δώσε το id του EpalUsers.'
))
->
setSettings
(
array
(
->
setSetting
(
'target_type'
,
'epal_users'
)
'max_length'
=>
50
,
->
setSetting
(
'handler'
,
'default'
)
'text_processing'
=>
0
,
->
setTranslatable
(
TRUE
)
))
->
setDefaultValue
(
''
)
->
setDisplayOptions
(
'view'
,
array
(
->
setDisplayOptions
(
'view'
,
array
(
'label'
=>
'
above
'
,
'label'
=>
'
hidden
'
,
'type'
=>
'
string
'
,
'type'
=>
'
author
'
,
'weight'
=>
-
4
,
'weight'
=>
0
,
))
))
->
setDisplayOptions
(
'form'
,
array
(
->
setDisplayOptions
(
'form'
,
array
(
'type'
=>
'string_textfield'
,
'type'
=>
'entity_reference_autocomplete'
,
'weight'
=>
-
4
,
'weight'
=>
5
,
))
'settings'
=>
array
(
'match_operator'
=>
'CONTAINS'
,
'size'
=>
'60'
,
'autocomplete_type'
=>
'tags'
,
'placeholder'
=>
''
,
),
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
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')
$fields['surname'] = BaseFieldDefinition::create('string')
->setLabel(t('Surname'))
->setLabel(t('Surname'))
->setDescription(t('The surname of the Student entity.'))
->setDescription(t('The surname of the Student entity.'))
...
@@ -310,13 +304,34 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
...
@@ -310,13 +304,34 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
))
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', 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'
)
$fields
[
'
studentSurname
'
]
=
BaseFieldDefinition
::
create
(
'string'
)
->
setLabel
(
t
(
'
Address
'
))
->
setLabel
(
t
(
'
Επώνυμο μαθητή
'
))
->
setDescription
(
t
(
'
The address of the Student entity
.'
))
->
setDescription
(
t
(
'
Δώσε το επώνυμο μαθητή
.'
))
->
setSettings
(
array
(
->
setSettings
(
array
(
'max_length'
=>
25
5
,
'max_length'
=>
5
0
,
'text_processing'
=>
0
,
'text_processing'
=>
0
,
))
))
->
setDefaultValue
(
''
)
->
setDefaultValue
(
''
)
...
@@ -331,12 +346,13 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
...
@@ -331,12 +346,13 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
))
))
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'form'
,
TRUE
)
->
setDisplayConfigurable
(
'view'
,
TRUE
);
->
setDisplayConfigurable
(
'view'
,
TRUE
);
$fields
[
'birthdate'
]
=
BaseFieldDefinition
::
create
(
'datetime'
)
/*
->
setLabel
(
t
(
'Birth date'
))
$fields['birthdate'] = BaseFieldDefinition::create('datetime')
->
setDescription
(
t
(
'The birth date'
))
->setLabel(t('Ημερομηνία γέννησης μαθητή'))
->setDescription(t('Δώσε την Ημερομηνία γέννησης μαθητή.'))
->setSetting('datetime_type', 'date')
->setSetting('datetime_type', 'date')
->
setRequired
(
tru
e
)
->setRequired(
fals
e)
->setDisplayOptions('view', array(
->setDisplayOptions('view', array(
'label' => 'above',
'label' => 'above',
'type' => 'string',
'type' => 'string',
...
@@ -347,7 +363,207 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
...
@@ -347,7 +363,207 @@ class EpalStudent extends ContentEntityBase implements EpalStudentInterface {
))
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', 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
,