PHP code example of recras / sf-doctrine-rest-generator-plugin
1. Go to this page and download the library: Download recras/sf-doctrine-rest-generator-plugin library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
recras / sf-doctrine-rest-generator-plugin example snippets
function additionalFieldIsDeleted(array $object, array $parameters): mixed
{
// $object contains the object as it currently is formatted
// $parameters contains the request parameters from this API call
// return the value you'd like field "is_deleted" to have
}
// in formatObjects:
$this->objects[$key]['is_deleted'] = $this->additionalFieldIsDeleted($this->objects[$key], $parameters);