2017-03-15 20:00:39 +00:00
|
|
|
<?php namespace Cms\Components;
|
2014-06-26 06:09:25 +00:00
|
|
|
|
2018-08-24 17:40:40 +00:00
|
|
|
use Cms\Classes\CodeBase;
|
2017-03-20 06:31:35 +00:00
|
|
|
use Cms\Classes\ComponentBase;
|
2014-06-26 06:09:25 +00:00
|
|
|
|
|
|
|
|
class UnknownComponent extends ComponentBase
|
|
|
|
|
{
|
2017-03-15 20:00:39 +00:00
|
|
|
/**
|
|
|
|
|
* @var string Error message that is shown with this error component.
|
|
|
|
|
*/
|
2014-06-26 06:09:25 +00:00
|
|
|
protected $errorMessage;
|
|
|
|
|
|
|
|
|
|
/**
|
2017-03-15 19:26:14 +00:00
|
|
|
* @inheritDoc
|
2014-06-26 06:09:25 +00:00
|
|
|
*/
|
|
|
|
|
public function __construct($cmsObject, $properties, $errorMessage)
|
|
|
|
|
{
|
|
|
|
|
$this->errorMessage = $errorMessage;
|
|
|
|
|
$this->componentCssClass = 'error-component';
|
|
|
|
|
$this->inspectorEnabled = false;
|
|
|
|
|
|
|
|
|
|
parent::__construct($cmsObject, $properties);
|
|
|
|
|
}
|
|
|
|
|
|
2015-10-16 14:30:26 +00:00
|
|
|
/**
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2014-06-26 06:09:25 +00:00
|
|
|
public function componentDetails()
|
|
|
|
|
{
|
|
|
|
|
return [
|
2015-06-06 06:49:30 +00:00
|
|
|
'name' => 'Unknown component',
|
2014-06-26 06:09:25 +00:00
|
|
|
'description' => $this->errorMessage
|
|
|
|
|
];
|
|
|
|
|
}
|
2014-10-10 23:22:03 +00:00
|
|
|
}
|