mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
This should be considered experimental at this stage, however this component is used in every October website we've built thus far, it makes sense for it to be included in the core. Once tested we will look at documenting it with an accompanying screencast video.
36 lines
790 B
PHP
36 lines
790 B
PHP
<?php namespace Cms\Components;
|
|
|
|
use Cms\Classes\CodeBase;
|
|
use Cms\Classes\ComponentBase;
|
|
|
|
class UnknownComponent extends ComponentBase
|
|
{
|
|
/**
|
|
* @var string Error message that is shown with this error component.
|
|
*/
|
|
protected $errorMessage;
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function __construct($cmsObject, $properties, $errorMessage)
|
|
{
|
|
$this->errorMessage = $errorMessage;
|
|
$this->componentCssClass = 'error-component';
|
|
$this->inspectorEnabled = false;
|
|
|
|
parent::__construct($cmsObject, $properties);
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function componentDetails()
|
|
{
|
|
return [
|
|
'name' => 'Unknown component',
|
|
'description' => $this->errorMessage
|
|
];
|
|
}
|
|
}
|