Crud\Traits\FindMethodTrait::_notFound PHP Méthode

_notFound() protected méthode

Throw exception if a record is not found
protected _notFound ( string $id, Crud\Event\Subject $subject ) : void
$id string Record id
$subject Crud\Event\Subject Event subject
Résultat void
    protected function _notFound($id, Subject $subject)
    {
        $subject->set(['success' => false]);
        $this->_trigger('recordNotFound', $subject);
        $message = $this->message('recordNotFound', compact('id'));
        $exceptionClass = $message['class'];
        throw new $exceptionClass($message['text'], $message['code']);
    }