3 namespace Drupal\{{ machine_name }};
5 use Drupal\Core\Entity\ContentEntityInterface;
6 {% if author_base_field %}
7 use Drupal\user\EntityOwnerInterface;
9 {% if changed_base_field %}
10 use Drupal\Core\Entity\EntityChangedInterface;
14 * Provides an interface defining {{ entity_type_label|article|lower }} entity type.
16 interface {{ class_prefix }}Interface extends ContentEntityInterface{% if author_base_field %}, EntityOwnerInterface{% endif %}{% if changed_base_field %}, EntityChangedInterface{% endif %} {
18 {% if title_base_field %}
20 * Gets the {{ entity_type_label|lower }} title.
23 * Title of the {{ entity_type_label|lower }}.
25 public function getTitle();
28 * Sets the {{ entity_type_label|lower }} title.
30 * @param string $title
31 * The {{ entity_type_label|lower }} title.
33 * @return \Drupal\{{ machine_name }}\{{ class_prefix }}Interface
34 * The called {{ entity_type_label|lower }} entity.
36 public function setTitle($title);
39 {% if created_base_field %}
41 * Gets the {{ entity_type_label|lower }} creation timestamp.
44 * Creation timestamp of the {{ entity_type_label|lower }}.
46 public function getCreatedTime();
49 * Sets the {{ entity_type_label|lower }} creation timestamp.
51 * @param int $timestamp
52 * The {{ entity_type_label|lower }} creation timestamp.
54 * @return \Drupal\{{ machine_name }}\{{ class_prefix }}Interface
55 * The called {{ entity_type_label|lower }} entity.
57 public function setCreatedTime($timestamp);
60 {% if status_base_field %}
62 * Returns the {{ entity_type_label|lower }} status.
65 * TRUE if the {{ entity_type_label|lower }} is enabled, FALSE otherwise.
67 public function isEnabled();
70 * Sets the {{ entity_type_label|lower }} status.
73 * TRUE to enable this {{ entity_type_label|lower }}, FALSE to disable.
75 * @return \Drupal\{{ machine_name }}\{{ class_prefix }}Interface
76 * The called {{ entity_type_label|lower }} entity.
78 public function setStatus($status);