Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / module / content-entity / src / ExampleInterface.php.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/module/content-entity/src/ExampleInterface.php.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/module/content-entity/src/ExampleInterface.php.twig
new file mode 100755 (executable)
index 0000000..1457187
--- /dev/null
@@ -0,0 +1,81 @@
+<?php
+
+namespace Drupal\{{ machine_name }};
+
+use Drupal\Core\Entity\ContentEntityInterface;
+{% if author_base_field %}
+use Drupal\user\EntityOwnerInterface;
+{% endif %}
+{% if changed_base_field %}
+use Drupal\Core\Entity\EntityChangedInterface;
+{% endif %}
+
+/**
+ * Provides an interface defining {{ entity_type_label|article|lower }} entity type.
+ */
+interface {{ class_prefix }}Interface extends ContentEntityInterface{% if author_base_field %}, EntityOwnerInterface{% endif %}{% if changed_base_field %}, EntityChangedInterface{% endif %} {
+
+{% if title_base_field %}
+  /**
+   * Gets the {{ entity_type_label|lower }} title.
+   *
+   * @return string
+   *   Title of the {{ entity_type_label|lower }}.
+   */
+  public function getTitle();
+
+  /**
+   * Sets the {{ entity_type_label|lower }} title.
+   *
+   * @param string $title
+   *   The {{ entity_type_label|lower }} title.
+   *
+   * @return \Drupal\{{ machine_name }}\{{ class_prefix }}Interface
+   *   The called {{ entity_type_label|lower }} entity.
+   */
+  public function setTitle($title);
+
+{% endif %}
+{% if created_base_field %}
+  /**
+   * Gets the {{ entity_type_label|lower }} creation timestamp.
+   *
+   * @return int
+   *   Creation timestamp of the {{ entity_type_label|lower }}.
+   */
+  public function getCreatedTime();
+
+  /**
+   * Sets the {{ entity_type_label|lower }} creation timestamp.
+   *
+   * @param int $timestamp
+   *   The {{ entity_type_label|lower }} creation timestamp.
+   *
+   * @return \Drupal\{{ machine_name }}\{{ class_prefix }}Interface
+   *   The called {{ entity_type_label|lower }} entity.
+   */
+  public function setCreatedTime($timestamp);
+
+{% endif %}
+{% if status_base_field %}
+  /**
+   * Returns the {{ entity_type_label|lower }} status.
+   *
+   * @return bool
+   *   TRUE if the {{ entity_type_label|lower }} is enabled, FALSE otherwise.
+   */
+  public function isEnabled();
+
+  /**
+   * Sets the {{ entity_type_label|lower }} status.
+   *
+   * @param bool $status
+   *   TRUE to enable this {{ entity_type_label|lower }}, FALSE to disable.
+   *
+   * @return \Drupal\{{ machine_name }}\{{ class_prefix }}Interface
+   *   The called {{ entity_type_label|lower }} entity.
+   */
+  public function setStatus($status);
+
+{% endif %}
+}