Final Class Yiisoft\Yii\DataView\Pagination\PaginatorNotSetException
| Inheritance | Yiisoft\Yii\DataView\Pagination\PaginatorNotSetException » RuntimeException |
|---|---|
| Implements | Yiisoft\FriendlyException\FriendlyExceptionInterface |
Exception thrown when attempting to use a pagination widget without setting a paginator.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Creates a new instance with an optional custom message. | Yiisoft\Yii\DataView\Pagination\PaginatorNotSetException |
| getName() | Yiisoft\Yii\DataView\Pagination\PaginatorNotSetException | |
| getSolution() | Yiisoft\Yii\DataView\Pagination\PaginatorNotSetException |
Method Details
Creates a new instance with an optional custom message.
| public mixed __construct ( string $message = '' ) | ||
| $message | string |
Custom error message. If empty, use the default message. |
public function __construct(string $message = '')
{
$message = $message === '' ? $this->getName() : $message;
parent::__construct($message);
}
| public string getName ( ) |
public function getName(): string
{
return 'Failed to create widget because "paginator" is not set.';
}
| public string|null getSolution ( ) |
public function getSolution(): ?string
{
return <<<SOLUTION
You can configure the `paginator` property in the widget configuration. Use either `OffSetPaginator::class`
or `KeySetPaginator::class` as paginator.
For more information [see the documentation](https://github.com/yiisoft/data).
SOLUTION;
}
Signup or Login in order to comment.