diff --git a/docs/listener-configuration/listener-options.rst b/docs/listener-configuration/listener-options.rst index ec2a4785..5b4e2023 100644 --- a/docs/listener-configuration/listener-options.rst +++ b/docs/listener-configuration/listener-options.rst @@ -13,7 +13,7 @@ like this: public function initialize() { parent::initialize(); - $this->Crud->config('listeners.jsonApi.withJsonApiVersion', true); + $this->Crud->setConfig('listeners.jsonApi.withJsonApiVersion', true); } withJsonApiVersion @@ -88,7 +88,7 @@ to manipulate the generated json response. For example: public function initialize() { parent::initialize(); - $this->Crud->config('listeners.jsonApi.jsonOptions', [ + $this->Crud->setConfig('listeners.jsonApi.jsonOptions', [ JSON_HEX_QUOT, JSON_UNESCAPED_UNICODE, ]); @@ -108,7 +108,7 @@ Please note that entity names: .. code-block:: phpinline - $this->Crud->config('listeners.jsonApi.include', [ + $this->Crud->setConfig('listeners.jsonApi.include', [ 'currency', // belongsTo relationship and thus singular 'cultures', // hasMany relationship and thus plural ]); @@ -127,7 +127,7 @@ generated json. For example: .. code-block:: phpinline - $this->Crud->config('listeners.jsonApi.fieldSets', [ + $this->Crud->setConfig('listeners.jsonApi.fieldSets', [ 'countries' => [ // main record 'name', ], diff --git a/docs/preface/setup.rst b/docs/preface/setup.rst index ac5a192e..a22a2246 100644 --- a/docs/preface/setup.rst +++ b/docs/preface/setup.rst @@ -116,7 +116,7 @@ class and enabling it with the ``exceptionRenderer`` configuration option. public function initialize() { parent::initialize(); - $this->Crud->config(['listeners.jsonApi.exceptionRenderer' => 'App\Error\JsonApiExceptionRenderer']); + $this->Crud->setConfig(['listeners.jsonApi.exceptionRenderer' => 'App\Error\JsonApiExceptionRenderer']); } }