3 namespace Drupal\fontyourface;
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
9 * Provides an interface for defining Font entities.
11 * @ingroup fontyourface
13 interface FontInterface extends ContentEntityInterface, EntityChangedInterface {
16 * Gets the Font provider ID.
21 public function getProvider();
24 * Sets the Font provider ID.
26 * @param string $provider
27 * The Font provider ID.
29 * @return \Drupal\fontyourface\FontInterface
30 * The called Font entity.
32 public function setProvider($provider);
35 * Gets the Font metadata.
38 * Mixed type of metadata.
40 public function getMetadata();
43 * Sets the Font metadata.
45 * @param mixed $metadata
48 * @return \Drupal\fontyourface\FontInterface
49 * The called Font entity.
51 public function setMetadata($metadata);
54 * Gets the Font creation timestamp.
57 * Creation timestamp of the Font.
59 public function getCreatedTime();
62 * Sets the Font creation timestamp.
64 * @param int $timestamp
65 * The Font creation timestamp.
67 * @return \Drupal\fontyourface\FontInterface
68 * The called Font entity.
70 public function setCreatedTime($timestamp);
73 * Gets the Font changed timestamp.
76 * Creation timestamp of the Font.
78 public function getChangedTime();
81 * Sets the Font changed timestamp.
83 * @param int $timestamp
84 * The Font creation timestamp.
86 * @return \Drupal\fontyourface\FontInterface
87 * The called Font entity.
89 public function setChangedTime($timestamp);
92 * Checks if the font is enabled.
95 * TRUE is font is enabled. FALSE otherwise.
97 public function isEnabled();
100 * Checks if the font is disabled.
103 * TRUE is font is disabled. FALSE otherwise.
105 public function isDisabled();
111 * TRUE is font is enabled. FALSE otherwise.
113 public function enable();
119 * TRUE is font is disabled. FALSE otherwise.
121 public function disable();
124 * Returns list of enabled fonts.
129 public static function loadEnabledFonts();
132 * Returns font by url.
134 * @param string $font_url
135 * $The unique font url.
140 public static function loadByUrl($font_url);