/
ContainerBlockInstance.php
66 lines (54 loc) · 1.15 KB
/
ContainerBlockInstance.php
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
<?php
namespace Concrete\Core\Page\Container;
use Concrete\Core\Block\Block;
use Concrete\Core\Entity\Page\Container\Instance;
use Doctrine\ORM\EntityManager;
class ContainerBlockInstance
{
/**
* @var Block
*/
protected $block;
/**
* @var Instance
*/
protected $instance;
/**
* @var EntityManager
*/
protected $entityManager;
public function __construct(Block $block, Instance $instance, EntityManager $entityManager)
{
$this->instance = $instance;
$this->block = $block;
$this->entityManager = $entityManager;
}
/**
* @return Block
*/
public function getBlock(): Block
{
return $this->block;
}
/**
* @return Instance
*/
public function getInstance(): Instance
{
return $this->instance;
}
/**
* Runs when the file is about to be included.
*/
public function startRender()
{
return;
}
/**
* Runs when render is completed. This way we can trigger area recompute in a performant way.
*/
public function endRender()
{
return;
}
}