public function implementedEvents()
    {
        $this->setupDetectors();

        // make sure the listener does absolutely nothing unless
        // the application/vnd.api+json Accept header is used.
        if (!$this->_checkRequestType('jsonapi')) {
            return [];
        }

        // accept body data posted with Content-Type `application/vnd.api+json`
        $this->_controller()->RequestHandler->setConfig('inputTypeMap', [
            'jsonapi' => ['json_decode', true]
        ]);

        return [
            'Crud.beforeHandle' => ['callable' => [$this, 'beforeHandle'], 'priority' => 10],
            'Crud.setFlash' => ['callable' => [$this, 'setFlash'], 'priority' => 5],
            'Crud.beforeSave' => ['callable' => [$this, 'beforeSave'], 'priority' => 20],
            'Crud.afterSave' => ['callable' => [$this, 'afterSave'], 'priority' => 90],
            'Crud.afterDelete' => ['callable' => [$this, 'afterDelete'], 'priority' => 90],
            'Crud.beforeRender' => ['callable' => [$this, 'respond'], 'priority' => 100],
            'Crud.beforeRedirect' => ['callable' => [$this, 'beforeRedirect'], 'priority' => 100],
            'Crud.beforePaginate' => ['callable' => [$this, 'beforeFind'], 'priority' => 10],
            'Crud.beforeFind' => ['callable' => [$this, 'beforeFind'], 'priority' => 10],
            'Crud.afterFind' => ['callable' => [$this, 'afterFind'], 'priority' => 50],
        ];
    }