forked from drupal/drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockContentInterface.php
More file actions
105 lines (93 loc) · 2.9 KB
/
BlockContentInterface.php
File metadata and controls
105 lines (93 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
namespace Drupal\block_content;
use Drupal\Core\Access\AccessDependentInterface;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityChangedInterface;
use Drupal\Core\Entity\EntityPublishedInterface;
use Drupal\Core\Entity\RevisionLogInterface;
/**
* Provides an interface defining a custom block entity.
*/
interface BlockContentInterface extends ContentEntityInterface, EntityChangedInterface, RevisionLogInterface, EntityPublishedInterface, AccessDependentInterface {
/**
* Returns the block revision log message.
*
* @return string
* The revision log message.
*
* @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
* \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage() instead.
*/
public function getRevisionLog();
/**
* Sets the block description.
*
* @param string $info
* The block description.
*
* @return \Drupal\block_content\BlockContentInterface
* The class instance that this method is called on.
*/
public function setInfo($info);
/**
* Sets the block revision log message.
*
* @param string $revision_log
* The revision log message.
*
* @return \Drupal\block_content\BlockContentInterface
* The class instance that this method is called on.
*
* @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
* \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage() instead.
*/
public function setRevisionLog($revision_log);
/**
* Determines if the block is reusable or not.
*
* @return bool
* Returns TRUE if reusable and FALSE otherwise.
*/
public function isReusable();
/**
* Sets the block to be reusable.
*
* @param bool $reusable
* Whether the block should be reusable, defaults to TRUE.
*
* @return $this
*/
public function setReusable($reusable = TRUE);
/**
* Sets the theme value.
*
* When creating a new block content block from the block library, the user is
* redirected to the configure form for that block in the given theme. The
* theme is stored against the block when the block content add form is shown.
*
* @param string $theme
* The theme name.
*
* @return \Drupal\block_content\BlockContentInterface
* The class instance that this method is called on.
*/
public function setTheme($theme);
/**
* Gets the theme value.
*
* When creating a new block content block from the block library, the user is
* redirected to the configure form for that block in the given theme. The
* theme is stored against the block when the block content add form is shown.
*
* @return string
* The theme name.
*/
public function getTheme();
/**
* Gets the configured instances of this custom block.
*
* @return array
* Array of Drupal\block\Core\Plugin\Entity\Block entities.
*/
public function getInstances();
}