Crud\Traits\FindMethodTrait::_notFound PHP 메소드

_notFound() 보호된 메소드

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
리턴 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']);
    }