Final Class Yiisoft\Yii\DataView\DataReaderNotSetException
| Inheritance | Yiisoft\Yii\DataView\DataReaderNotSetException » LogicException |
|---|
Exception thrown when attempting to create a data view widget without setting a data reader.
This exception is thrown in scenarios where a data view widget (such as GridView or ListView)
is instantiated without providing a required data reader component. The data reader is essential
for the widget to access and iterate over the data that needs to be displayed.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Creates a new DataReaderNotSetException instance. |
Yiisoft\Yii\DataView\DataReaderNotSetException |
Method Details
Creates a new DataReaderNotSetException instance.
The exception message indicates that widget creation failed due to a missing data reader component.
| public __construct( ): mixed |
public function __construct()
{
parent::__construct('Failed to create widget because "dataReader" is not set.');
}
Signup or Login in order to comment.