Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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