Student Entity

parent 3c1cf4ad
......@@ -49,6 +49,9 @@ use Drupal\user\UserInterface;
* "uid" = "user_id",
* "langcode" = "langcode",
* "status" = "status",
* "surname" = "surname",
* "address" = "address",
* "birthdate" = "birthdate",
* },
* links = {
* "canonical" = "/admin/structure/student/{student}",
......@@ -116,6 +119,53 @@ class Student extends RevisionableContentEntityBase implements StudentInterface
return $this;
}
/**
* {@inheritdoc}
*/
public function getSurname() {
return $this->get('surname')->value;
}
/**
* {@inheritdoc}
*/
public function setSurname($surname) {
$this->set('surname', $surname);
return $this;
}
/**
* {@inheritdoc}
*/
public function getAddress() {
return $this->get('address')->value;
}
/**
* {@inheritdoc}
*/
public function setAddress($address) {
$this->set('address', $address);
return $this;
}
/**
* {@inheritdoc}
*/
public function getBirthdate() {
return $this->get('birthdate')->value;
}
/**
* {@inheritdoc}
*/
public function setBirthdate($birthdate) {
$this->set('birthdate', $birthdate);
return $this;
}
/**
* {@inheritdoc}
*/
......
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