38 lines
558 B
PHP
38 lines
558 B
PHP
<?php
|
|
|
|
class BlockPlusFacade implements DocTarget
|
|
{
|
|
/**
|
|
* @car Block
|
|
*/
|
|
private $block;
|
|
|
|
public function __construct(Block $block)
|
|
{
|
|
if (!$block->id) {
|
|
throw new \Exception('Wrong model');
|
|
}
|
|
$this->block = $block;
|
|
}
|
|
|
|
public function getDocTargetType()
|
|
{
|
|
return Document::TYPE_BLOCK_PLUS;
|
|
}
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
public function getBlock()
|
|
{
|
|
return $this->block;
|
|
}
|
|
|
|
/**
|
|
* @return integer
|
|
*/
|
|
public function getDocTargetId()
|
|
{
|
|
return $this->block->id;
|
|
}
|
|
} |