Craft 3 Class Reference

Class craft\errors\InvalidElementException

Inheritance
craft\errors\InvalidElementException » yii\base\Exception » Exception
Available since version
3.0
Source Code
https://github.com/craftcms/cms/blob/master/src/errors/InvalidElementException.php

InvalidElementException represents an exception caused by setting an invalid element.

Public Properties
Property Type Description Defined By
$element craft\base\ElementInterface The element craft\errors\InvalidElementException
Public Methods
Method Description Defined By
__construct() Constructor. craft\errors\InvalidElementException
getName() craft\errors\InvalidElementException

Property Details

$element public property #

The element

public craft\base\ElementInterface $element null

Method Details

__construct() public method #

Constructor.

public void __construct ( craft\base\ElementInterface $element, \craft\errors\string $message null, \craft\errors\int $code 0 )
$element craft\base\ElementInterface The element
$message string, null The error message
$code integer The error code

getName() public method #

public string getName ( )
return string The user-friendly name of this exception