0 follower

Final Class Yiisoft\Yii\DataView\DataReaderNotSetException

InheritanceYiisoft\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

Hide inherited methods

Method Description Defined By
__construct() Creates a new DataReaderNotSetException instance. Yiisoft\Yii\DataView\DataReaderNotSetException

Method Details

Hide inherited methods

__construct() public method

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.');
}