From fc9a50d8fe45b01a7635c1c5a40223edf5566a23 Mon Sep 17 00:00:00 2001 From: Bernat Arlandis Date: Tue, 7 Feb 2023 12:22:20 +0100 Subject: [PATCH] Call setConfig() instead of config() in docs --- docs/listener-configuration/listener-options.rst | 8 ++++---- docs/preface/setup.rst | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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']); } }