Skip to content

Commit

Permalink
Merge pull request #179 from berarma/fix-docs
Browse files Browse the repository at this point in the history
Call setConfig() instead of config() in docs
  • Loading branch information
ADmad committed Feb 7, 2023
2 parents a8a67c6 + fc9a50d commit 0948900
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/listener-configuration/listener-options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
]);
Expand All @@ -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
]);
Expand All @@ -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',
],
Expand Down
2 changes: 1 addition & 1 deletion docs/preface/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
}
Expand Down

0 comments on commit 0948900

Please sign in to comment.