Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Χάρης Παπαδόπουλος
e-epal
Commits
2fb612e0
Commit
2fb612e0
authored
Jan 20, 2017
by
Χάρης Παπαδόπουλος
Browse files
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
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
);
$fields
[
'certificateType'
]
=
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
);