Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Drupal\display_builder;
6
7/**
8 * Provides an interface defining a display builder instance entity type.
9 */
10interface PublishableInterface {
11
12  /**
13   * Check display has required context, meaning it can save value.
14   *
15   * @return bool
16   *   True if required, False otherwise.
17   */
18  public function isPublishable(): bool;
19
20  /**
21   * If display builder has been saved.
22   *
23   * @return bool
24   *   Has save data.
25   */
26  public function isPublished(): bool;
27
28  /**
29   * The save value is the current value of display builder.
30   *
31   * @return bool
32   *   The save is the current or not.
33   */
34  public function isPublishedPresent(): bool;
35
36  /**
37   * Get the hash of the published data.
38   *
39   * @return ?int
40   *   The hash of the published data. NULL if the display has never been
41   *    published.
42   */
43  public function getPublishedHash(): ?int;
44
45  /**
46   * Get the time of the published data.
47   *
48   * @return ?int
49   *   The timestamp of the published data. NULL if the display has never been
50   *    published.
51   */
52  public function getPublishedTime(): ?int;
53
54  /**
55   * Publish current state.
56   */
57  public function publish(): void;
58
59  /**
60   * Restore to the last published state.
61   */
62  public function restore(): void;
63
64}