Merge branch 'epalreadydata' into 'develop'

updated epalreadydata entity relationship

See merge request !6
parents 9b32b840 c9235f40
......@@ -196,6 +196,7 @@ class EepalAdminArea extends ContentEntityBase implements EepalAdminAreaInterfac
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
/*
$fields['region_to_belong'] = BaseFieldDefinition::create('integer')
->setLabel(t('region_to_belong'))
->setDescription(t('Περιφερειακή Διεύθυνση στην οποία ανήκει.'))
......@@ -216,6 +217,31 @@ class EepalAdminArea extends ContentEntityBase implements EepalAdminAreaInterfac
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
*/
$fields['region_to_belong'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('region_to_belong'))
->setDescription(t('Περιφερειακή Διεύθυνση στην οποία ανήκει.'))
->setSetting('target_type', 'eepal_region')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
))
->setDisplayOptions('form', array(
'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'))
......
......@@ -16,12 +16,13 @@ class EepalAdminAreaViewsData extends EntityViewsData implements EntityViewsData
public function getViewsData() {
$data = parent::getViewsData();
$data['eepal_admin_area']['table']['base'] = array(
/*
$data['eepal_admin_area']['table']['base'] = array(
'field' => 'id',
'title' => $this->t('Eepal admin area'),
'help' => $this->t('The Eepal admin area ID.'),
);
*/
return $data;
}
......
......@@ -196,24 +196,27 @@ class EepalPrefecture extends ContentEntityBase implements EepalPrefectureInterf
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['dief_to_belong'] = BaseFieldDefinition::create('integer')
$fields['dief_to_belong'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('region_to_belong'))
->setDescription(t('Περιφερειακή Διεύθυνση στην οποία ανήκει.'))
->setRevisionable(TRUE)
->setSettings(array(
//'max_length' => 2,
'text_processing' => 0,
))
//->setDefaultValue(25)
->setSetting('target_type', 'eepal_admin_area')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
//'weight' => -4,
))
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
))
->setDisplayOptions('form', array(
'type' => 'integer',
//'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);
......
......@@ -16,11 +16,13 @@ class EepalPrefectureViewsData extends EntityViewsData implements EntityViewsDat
public function getViewsData() {
$data = parent::getViewsData();
/*
$data['eepal_prefecture']['table']['base'] = array(
'field' => 'id',
'title' => $this->t('Eepal prefecture'),
'help' => $this->t('The Eepal prefecture ID.'),
);
*/
return $data;
}
......
......@@ -16,11 +16,13 @@ class EepalRegionViewsData extends EntityViewsData implements EntityViewsDataInt
public function getViewsData() {
$data = parent::getViewsData();
/*
$data['eepal_region']['table']['base'] = array(
'field' => 'id',
'title' => $this->t('Eepal region'),
'help' => $this->t('The Eepal region ID.'),
);
*/
return $data;
}
......
......@@ -356,68 +356,77 @@ class EepalSchool extends ContentEntityBase implements EepalSchoolInterface {
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['region_edu_admin_id'] = BaseFieldDefinition::create('integer')
$fields['region_edu_admin_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('ID Περιφερειακής Διεύθυνσης'))
->setDescription(t('Δώσε το ID της Περιφερειακής Διεύθυνσης στην οποία ανήκει.'))
->setRevisionable(TRUE)
->setSettings(array(
//'max_length' => 2,
'text_processing' => 0,
))
//->setDefaultValue(25)
->setSetting('target_type', 'eepal_region')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
//'weight' => -4,
))
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
))
->setDisplayOptions('form', array(
'type' => 'integer',
//'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);
->setDisplayConfigurable('view', TRUE);
$fields['edu_admin_id'] = BaseFieldDefinition::create('integer')
$fields['edu_admin_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('ID Διεύθυνσης Εκπαίδευσης'))
->setDescription(t('Δώσε το ID της Διεύθυνσης Εκπαίδευσης στην οποία ανήκει.'))
->setRevisionable(TRUE)
->setSettings(array(
//'max_length' => 2,
'text_processing' => 0,
))
//->setDefaultValue(25)
->setSetting('target_type', 'eepal_admin_area')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
//'weight' => -4,
))
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
))
->setDisplayOptions('form', array(
'type' => 'integer',
//'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);
->setDisplayConfigurable('view', TRUE);
$fields['prefecture_id'] = BaseFieldDefinition::create('integer')
$fields['prefecture_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('ID Νομαρχίας'))
->setDescription(t('Δώσε το ID της Νομαρχίας στην οποία ανήκει.'))
->setRevisionable(TRUE)
->setSettings(array(
//'max_length' => 2,
'text_processing' => 0,
))
//->setDefaultValue(25)
->setSetting('target_type', 'eepal_prefecture')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
//'weight' => -4,
))
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
))
->setDisplayOptions('form', array(
'type' => 'integer',
//'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);
->setDisplayConfigurable('view', TRUE);
$fields['municipality'] = BaseFieldDefinition::create('string')
->setLabel(t('Δήμος-Περιοχή Σχολείου'))
......
......@@ -16,11 +16,13 @@ class EepalSchoolViewsData extends EntityViewsData implements EntityViewsDataInt
public function getViewsData() {
$data = parent::getViewsData();
/*
$data['eepal_school']['table']['base'] = array(
'field' => 'id',
'title' => $this->t('Eepal school'),
'help' => $this->t('The Eepal school ID.'),
);
*/
return $data;
}
......
......@@ -196,24 +196,51 @@ class EepalSpecialtiesInEpal extends ContentEntityBase implements EepalSpecialti
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
$fields['specialty_id'] = BaseFieldDefinition::create('integer')
->setLabel(t('region_to_belong'))
->setDescription(t('Περιφερειακή Διεύθυνση στην οποία ανήκει.'))
->setRevisionable(TRUE)
->setSettings(array(
//'max_length' => 2,
'text_processing' => 0,
))
//->setDefaultValue(25)
$fields['epal_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Σχολείο επιλογής'))
->setDescription(t('Σχολείο επιλογής.'))
->setSetting('target_type', 'eepal_school')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'above',
'type' => 'integer',
//'weight' => -4,
))
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
))
->setDisplayOptions('form', array(
'type' => 'integer',
//'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['specialty_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Ειδικότητα επιλογής'))
->setDescription(t('Ειδικότητα επιλογής.'))
->setSetting('target_type', 'eepal_specialty')
->setSetting('handler', 'default')
->setTranslatable(TRUE)
->setDisplayOptions('view', array(
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
))
->setDisplayOptions('form', array(
'type' => 'entity_reference_autocomplete',
'weight' => 5,
'settings' => array(
'match_operator' => 'CONTAINS',
'size' => '60',
'autocomplete_type' => 'tags',
'placeholder' => '',
),
))
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);
......
......@@ -16,11 +16,13 @@ class EepalSpecialtiesInEpalViewsData extends EntityViewsData implements EntityV
public function getViewsData() {
$data = parent::getViewsData();
/*
$data['eepal_specialties_in_epal']['table']['base'] = array(
'field' => 'id',
'title' => $this->t('Eepal specialties in epal'),
'help' => $this->t('The Eepal specialties in epal ID.'),
);
*/
return $data;
}
......
......@@ -16,11 +16,13 @@ class EepalSpecialtyViewsData extends EntityViewsData implements EntityViewsData
public function getViewsData() {
$data = parent::getViewsData();
/*
$data['eepal_specialty']['table']['base'] = array(
'field' => 'id',
'title' => $this->t('Eepal specialty'),
'help' => $this->t('The Eepal specialty ID.'),
);
*/
return $data;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment