Function get
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function get(): array
{
$displayData = $fieldsLabel = [];
$moduleName = $this->controller->request->get('module');
$setRawData = 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function checkPermission
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
protected function checkPermission(): void
{
parent::checkPermission();
$moduleName = $this->controller->request->getModule();
if ('POST' === $this->controller->method) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method get
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get(): array
{
$displayData = $fieldsLabel = [];
$moduleName = $this->controller->request->get('module');
$setRawData = 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0);
Method checkPermission
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function checkPermission(): void
{
parent::checkPermission();
$moduleName = $this->controller->request->getModule();
if ('POST' === $this->controller->method) {
Function post
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function post(): array
{
if (1 !== $this->getUserData('type')) {
foreach ($this->recordModel->getModule()->getFieldsByType('serverAccess') as $fieldName => $fieldModel) {
if ($fieldModel->getFieldParams() == $this->getUserData('server_id')) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The method get() has an NPath complexity of 1064. The configured NPath complexity threshold is 200. Open
public function get(): array
{
$displayData = $fieldsLabel = [];
$moduleName = $this->controller->request->get('module');
$setRawData = 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0);
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method checkPermission() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
protected function checkPermission(): void
{
parent::checkPermission();
$moduleName = $this->controller->request->getModule();
if ('POST' === $this->controller->method) {
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method get() has a Cyclomatic Complexity of 17. The configured cyclomatic complexity threshold is 10. Open
public function get(): array
{
$displayData = $fieldsLabel = [];
$moduleName = $this->controller->request->get('module');
$setRawData = 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0);
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed. Open
protected function checkPermission(): void
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed. Open
public function get(): array
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Missing class import via use statement (line '60', column '17'). Open
throw new \Api\Core\Exception('No permissions to view record', 403);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '329', column '20'). Open
$saveModel = new \Api\WebserviceStandard\Save();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '40', column '15'). Open
throw new \Api\Core\Exception('No permissions to create record', 403);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '47', column '15'). Open
throw new \Api\Core\Exception('Record doesn\'t exist', 404);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '66', column '17'). Open
throw new \Api\Core\Exception('No permissions to edit record', 403);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '44', column '15'). Open
throw new \Api\Core\Exception('No record id', 404);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '54', column '17'). Open
throw new \Api\Core\Exception('No permissions to remove record', 403);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class '\App\Record' in method 'checkPermission'. Open
if (!\App\Record::isExists($this->controller->request->getInteger('record'), $moduleName)) {
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Vtiger_Record_Model' in method 'checkPermission'. Open
$this->recordModel = \Vtiger_Record_Model::getInstanceById($this->controller->request->getInteger('record'), $moduleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Fields\Currency' in method 'get'. Open
$summaryInventory[$name] = \App\Fields\Currency::formatToDisplay($field->getSummaryValuesFromData($rawInventory), null, true);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Vtiger_Record_Model' in method 'checkPermission'. Open
$this->recordModel = \Vtiger_Record_Model::getCleanInstance($moduleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method checkPermission uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
if ($this->controller->request->isEmpty('record')) {
throw new \Api\Core\Exception('No record id', 404);
}
if (!\App\Record::isExists($this->controller->request->getInteger('record'), $moduleName)) {
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\Language' in method 'get'. Open
$fieldsLabel[$fieldModel->getName()] = \App\Language::translate($fieldModel->get('label'), $moduleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Json' in method 'get'. Open
$fieldParams = \App\Json::decode($this->controller->request->getHeader('x-fields-params')) ?: [];
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Purifier' in method 'get'. Open
'name' => \App\Purifier::decodeHtml($this->recordModel->getName()),
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Api\WebserviceStandard\Fields' in method 'put'. Open
\Api\WebserviceStandard\Fields::loadWebserviceFields($this->recordModel->getModule(), $this);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Log' in method 'checkPermission'. Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid assigning values to variables in if clauses and the like (line '208', column '56'). Open
public function get(): array
{
$displayData = $fieldsLabel = [];
$moduleName = $this->controller->request->get('module');
$setRawData = 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0);
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class '\Vtiger_Inventory_Model' in method 'get'. Open
$inventoryModel = \Vtiger_Inventory_Model::getInstance($moduleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Log' in method 'checkPermission'. Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Log' in method 'checkPermission'. Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Api\WebserviceStandard\Fields' in method 'get'. Open
\Api\WebserviceStandard\Fields::loadWebserviceFields($this->recordModel->getModule(), $this);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Define a constant instead of duplicating this literal "record" 3 times. Open
if ($this->controller->request->isEmpty('record')) {
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Define a constant instead of duplicating this literal "Privilege::isPermittedLevel: " 3 times. Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Argument 1 (value)
is float|int
but \App\Fields\Currency::formatToDisplay()
takes string
defined at /code/app/Fields/Currency.php:30
Open
$summaryInventory[$name] = \App\Fields\Currency::formatToDisplay($field->getSummaryValuesFromData($rawInventory), null, true);
- Exclude checks
Call to method error
from undeclared class \App\Log
Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Exclude checks
Call to method error
from undeclared class \App\Log
Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Exclude checks
Call to method error
from undeclared class \App\Log
Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Exclude checks
Possibly zero references to use statement for classlike/namespace OA
(\OpenApi\Annotations)
Open
use OpenApi\Annotations as OA;
- Exclude checks
Argument 1 (state)
is 'Trash'
but \Vtiger_Record_Model::changeState()
takes \type
defined at /code/modules/Vtiger/models/Record.php:1784
Open
$this->recordModel->changeState('Trash');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!$this->recordModel->isViewable()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Gets the details of a record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Data for the record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=403,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=404,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Fields-Settings"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @author Mariusz Krzaczkowski <m.krzaczkowski@yetiforce.com>
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @author Arkadiusz Adach <a.adach@yetiforce.com>
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!\App\Record::isExists($this->controller->request->getInteger('record'), $moduleName)) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
case 'DELETE':
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
case 'PUT':
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Gets the details of a record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="x-parent-id", in="header", @OA\Schema(type="integer"), description="Parent record id", required=false, example=5),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public $allowedMethod = ['GET', 'DELETE', 'PUT', 'POST'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \Api\Core\Exception('No permissions to create record', 403);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record/{recordId}",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Fields-Settings"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Get_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public $recordModel;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \Api\Core\Exception('No permissions to edit record', 403);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \Api\Core\Exception('No record id', 404);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Get record detail.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Get_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!$this->recordModel->privilegeToMoveToTrash()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \Api\Core\Exception('No permissions to view record', 403);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="x-raw-data", in="header", @OA\Schema(type="integer", enum={0, 1}), description="Gets raw data", required=false, example=1),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="x-fields-params", in="header", description="JSON array - list of fields to be returned in the specified way", required=false,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="`No permissions to remove record` OR `No permissions to view record` OR `No permissions to edit record`",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @license YetiForce Public License 6.5 (licenses/LicenseEN.txt or yetiforce.com)
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
switch ($this->controller->method) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public $allowedHeaders = ['x-parent-id', 'x-fields-params'];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
protected function checkPermission(): void
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->recordModel = \Vtiger_Record_Model::getCleanInstance($moduleName);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
case 'GET':
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @api
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Get(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Get_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=403,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$moduleName = $this->controller->request->getModule();
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="x-parent-id", in="header", @OA\Schema(type="integer"), description="Parent record id", required=false, example=5),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ('POST' === $this->controller->method) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \Api\Core\Exception('Record doesn\'t exist', 404);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="A list of custom parameters that can affect the return value of a given field.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($this->controller->request->isEmpty('record')) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
default:
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record/{recordId}",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Data for the record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="x-raw-data", in="header", @OA\Schema(type="integer", enum={0, 1}), description="Gets raw data", required=false, example=1),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!$this->recordModel->isCreateable()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!$this->recordModel->isEditable()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* operationId="getRecord",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Gets data for the record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @author Radosław Skrzypczak <r.skrzypczak@yetiforce.com>
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/** @var \Vtiger_Record_Model Record model instance. */
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
parent::checkPermission();
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->recordModel = \Vtiger_Record_Model::getInstanceById($this->controller->request->getInteger('record'), $moduleName);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
throw new \Api\Core\Exception('No permissions to remove record', 403);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* operationId="getRecord",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Get_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="`No permissions to remove record` OR `No permissions to view record` OR `No permissions to edit record`",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Response body for Record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public function get(): array
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
\App\Log::error('Privilege::isPermittedLevel: ' . \App\Privilege::$isPermittedLevel, 'API');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="x-fields-params", in="header", description="JSON array - list of fields to be returned in the specified way", required=false,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Gets data for the record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Custom field settings",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Get_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="isEditable", description="Check if record is editable", type="boolean", example=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$displayData = $fieldsLabel = [];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$fieldParams = \App\Json::decode($this->controller->request->getHeader('x-fields-params')) ?: [];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
continue;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="A list of custom parameters that can affect the return value of a given field.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"name", "id", "fields", "data"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\AdditionalProperties(type="string", description="Field label"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="rawData", description="Raw record data", type="object", ref="#/components/schemas/Record_Raw_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$displayData[$fieldModel->getName()] = $uiTypeModel->getApiDisplayValue($value, $this->recordModel, $fieldParams[$fieldModel->getName()] ?? []);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($this->recordModel->getModule()->isInventory()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$inventoryModel = \Vtiger_Inventory_Model::getInstance($moduleName);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$inventoryRow[$name] = $field->getDisplayValue($row[$name], $row, true);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$response['rawInventory'] = $rawInventory;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Response body for Record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$fieldsLabel[$fieldModel->getName()] = \App\Language::translate($fieldModel->get('label'), $moduleName);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
],
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$inventoryRow = [];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($inventoryFields as $name => $field) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ('id' === $key || 'record_module' === $key || (($fieldModel = $this->recordModel->getField($key)) && $fieldModel->isViewable())) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Custom field settings",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"password" : {"showHiddenData" : true}}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="data", title="Record data", type="object", ref="#/components/schemas/Record_Display_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$inventory = $summaryInventory = [];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=404,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="fields", type="object", title="System field names and field labels", example={"field_name_1" : "Field label 1", "field_name_2" : "Field label 2", "assigned_user_id" : "Assigned user", "createdtime" : "Created time"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\AdditionalProperties(type="string", description="Field label"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="inventory", description="Value inventory data", type="object"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="rawInventory", description="Inventory data", type="object"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$rawInventory = $this->recordModel->getInventoryData();
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$rawData = [];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Get_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="id", description="Record Id", type="integer", example=152),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Parameters determining checking of editing rights and moving to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
\Api\WebserviceStandard\Fields::loadWebserviceFields($this->recordModel->getModule(), $this);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$inventory[] = $inventoryRow;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'name' => \App\Purifier::decodeHtml($this->recordModel->getName()),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'fields' => $fieldsLabel,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'data' => $displayData,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$response['rawData'] = $rawData;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="`No record id` OR `Record doesn't exist`",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Record data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="moveToTrash", description="Permission to delete", type="boolean", example=false),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="inventory", description="Value inventory data", type="object"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="summaryInventory", description="Value summary inventory data", type="object"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="rawInventory", description="Inventory data", type="object"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($field->isSummary()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Fields-Settings",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="fields", type="object", title="System field names and field labels", example={"field_name_1" : "Field label 1", "field_name_2" : "Field label 2", "assigned_user_id" : "Assigned user", "createdtime" : "Created time"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="data", title="Record data", type="object", ref="#/components/schemas/Record_Display_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Fields-Settings",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"name", "id", "fields", "data"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="privileges",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="isEditable", description="Check if record is editable", type="boolean", example=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (!$fieldModel->isActiveField() || !$fieldModel->isViewable()) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$value = $this->recordModel->get($fieldModel->getName());
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$inventoryFields = $inventoryModel->getFields();
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$summaryInventory[$name] = \App\Fields\Currency::formatToDisplay($field->getSummaryValuesFromData($rawInventory), null, true);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($setRawData) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->recordModel->changeState('Trash');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Put(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Retrieves data for editing a record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Retrieves data for editing a record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Put_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="name", description="Record name", type="string", example="Driving school"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="id", description="Record Id", type="integer", example=152),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"isEditable", "moveToTrash"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$setRawData = 1 === (int) ($this->controller->headers['x-raw-data'] ?? 0);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($this->recordModel->getModule()->getFields() as $fieldModel) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'isEditable' => $this->recordModel->isEditable(),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'moveToTrash' => $this->recordModel->privilegeToDelete(),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($setRawData) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Delete record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record/{recordId}",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Put_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="result", type="object", title="Record data", description="Created record id and name.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="`No record id` OR `Record doesn't exist`",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"isEditable", "moveToTrash"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="moveToTrash", description="Permission to delete", type="boolean", example=false),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$uiTypeModel = $fieldModel->getUITypeModel();
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($rawInventory as $row) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$response['inventory'] = $inventory;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$response['summaryInventory'] = $summaryInventory;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"password" : {"showHiddenData" : true}}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Record data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="name", description="Record name", type="string", example="Driving school"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="privileges",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="summaryInventory", description="Value summary inventory data", type="object"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="rawData", description="Raw record data", type="object", ref="#/components/schemas/Record_Raw_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'privileges' => [
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($this->recordModel->getData() as $key => $value) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Delete_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the request contains an associative array with the data record.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Delete record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public function delete(): bool
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Link(link="GetRecordById", ref="#/components/links/GetRecordById")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* property="result",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Parameters determining checking of editing rights and moving to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$moduleName = $this->controller->request->get('module');
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$response = [
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'id' => $this->recordModel->getId(),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($inventoryFields as $name => $field) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$rawData[$key] = $this->recordModel->getRawValue($key);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Delete(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="List of records moved to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="name", type="string", description="Id of the newly created record", example="YetiForce Name"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return $response;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Put_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record/{recordId}",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Delete_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="result", type="boolean", description="Status of successful transfer of the record to the recycle bin"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Edit record.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Response body for Record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"id", "name"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record/{recordId}",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Changes the state of a record, moving it to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Delete_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Transfer to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200, description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @api
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record/{recordId}",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Edit record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Changes the state of a record, moving it to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Edit record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Put_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="List of records moved to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Delete_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Transfer to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the request contains an associative array with the data record.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=406, description="No input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Response body for Record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="List of records moved to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Delete_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Delete_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="result", type="boolean", description="Status of successful transfer of the record to the recycle bin"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200, description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=406, description="No input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Put_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"id", "name"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="id", type="integer", description="Id of the newly created record", example=22),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Delete record.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @api
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Put_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="id", type="integer", description="Id of the newly created record", example=22),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="List of records moved to the trash",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return bool
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Link(link="GetRecordById", ref="#/components/links/GetRecordById")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="result", type="object", title="Record data", description="Created record id and name.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Post(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Post_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"id" : 11, "field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : "YetiForce Administrator", "createdtime" : "2014-09-24 20:51"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @return array
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=406, description="No input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="name", type="string", description="Id of the newly created record", example="YetiForce Name"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @api
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required=true,
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Link(link="GetRecordById", ref="#/components/links/GetRecordById")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Record_Edit_Details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="General - Record edit details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Record data in user format for edit view",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Record_Display_Details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
];
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$return['skippedData'] = $saveModel->skippedData;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200, description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="BaseModule_Post_Record_Response",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="skippedData", type="object", description="List of parameters passed in the request that were skipped in the write process"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="General - Record raw details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$return = [
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Create new record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="skippedData", type="object", description="List of parameters passed in the request that were skipped in the write process"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="General - Record edit details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Record_Display_Details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Create record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Post_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=406, description="No input data",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : 1, "createdtime" : "2014-09-24 20:51:12"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"id" : 11, "field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : 1, "createdtime" : "2014-09-24 20:51:12"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Record data in user format for preview",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* Create record.
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the request contains an associative array with the data record.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Record data in the system format as stored in a database",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="General - Record display details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the request contains an associative array with the data record.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="result", type="object", title="Record data", description="Created record id and name.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="skippedData", type="object", description="List of parameters passed in the request that were skipped in the write process"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Record data in the system format as stored in a database",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Record data in user format for preview",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Post_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="General - Record raw details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\RequestBody(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/BaseModule_Post_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Created records",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="name", type="string", description="Id of the newly created record", example="YetiForce Name"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : 1, "createdtime" : "2014-09-24 20:51:12"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="General - Record display details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public function put(): array
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Link(link="GetRecordById", ref="#/components/links/GetRecordById")
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\JsonContent(ref="#/components/schemas/Exception"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
\Api\WebserviceStandard\Fields::loadWebserviceFields($this->recordModel->getModule(), $this);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$saveModel->init($this);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* summary="Create record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* security={{"basicAuth" : {}, "ApiKeyAuth" : {}, "token" : {}}},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* title="Base module - Created records",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"id", "name"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"id", "name"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="id", type="integer", description="Id of the newly created record", example=22),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Schema(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"id" : 11, "field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : "YetiForce Administrator", "createdtime" : "2014-09-24 20:51"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'name' => $this->recordModel->getName(),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="id", type="integer", description="Id of the newly created record", example=22),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="name", type="string", description="Id of the newly created record", example="YetiForce Name"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/BaseModule_Post_Record_Response"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* required={"status", "result"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Record_Raw_Details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* example={"id" : 11, "field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : 1, "createdtime" : "2014-09-24 20:51:12"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* type="object",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$saveModel = new \Api\WebserviceStandard\Save();
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($saveModel->skippedData) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* path="/webservice/WebserviceStandard/{moduleName}/Record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\XmlContent(ref="#/components/schemas/Record_Edit_Details"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="skippedData", type="object", description="List of parameters passed in the request that were skipped in the write process"),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Record_Edit_Details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Record data in user format for edit view",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* schema="Record_Raw_Details",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$saveModel->saveRecord($this->controller->request);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
'id' => $this->recordModel->getId(),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return $return;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="Create new record",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* tags={"BaseModule"},
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* response=200, description="Contents of the response contains only id",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Response(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Property(property="result", type="object", title="Record data", description="Created record id and name.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Link(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* operationId="getRecord",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
$this->recordModel->set($fieldName, 1);
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* link="GetRecordById",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
{
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* "recordId" = "$response.body#/result/id"
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
foreach ($this->recordModel->getModule()->getFieldsByType('serverAccess') as $fieldName => $fieldModel) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
return $this->put();
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* @OA\Link(
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* operationId="getRecord",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
}
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* parameters={
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* }
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="The `id` value returned in the response can be used as the `recordId` parameter in `GET /webservice/{moduleName}/Record/{recordId}`.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* ),
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if (1 !== $this->getUserData('type')) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
if ($fieldModel->getFieldParams() == $this->getUserData('server_id')) {
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* "recordId" = "$response.body#/result/id"
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* }
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* )
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* description="The `id` value returned in the response can be used as the `recordId` parameter in `GET /webservice/{moduleName}/Record/{recordId}`.",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* parameters={
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* link="GetRecordById",
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
* )
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
public function post(): array
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
* description="`No permissions to remove record` OR `No permissions to view record` OR `No permissions to edit record`",
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
$this->recordModel = \Vtiger_Record_Model::getInstanceById($this->controller->request->getInteger('record'), $moduleName);
- Exclude checks
Line exceeds 120 characters; contains 155 characters Open
* @OA\Parameter(name="x-raw-data", in="header", @OA\Schema(type="integer", enum={0, 1}), description="Gets raw data", required=false, example=1),
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
* @OA\Parameter(name="x-fields-params", in="header", description="JSON array - list of fields to be returned in the specified way", required=false,
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
* @OA\Parameter(name="x-parent-id", in="header", @OA\Schema(type="integer"), description="Parent record id", required=false, example=5),
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
$displayData[$fieldModel->getName()] = $uiTypeModel->getApiDisplayValue($value, $this->recordModel, $fieldParams[$fieldModel->getName()] ?? []);
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
* @OA\Property(property="moveToTrash", description="Permission to delete", type="boolean", example=false),
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
if ('id' === $key || 'record_module' === $key || (($fieldModel = $this->recordModel->getField($key)) && $fieldModel->isViewable())) {
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
* @OA\Property(property="data", title="Record data", type="object", ref="#/components/schemas/Record_Display_Details"),
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
* @OA\Property(property="rawData", description="Raw record data", type="object", ref="#/components/schemas/Record_Raw_Details"),
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
* @OA\Property(property="isEditable", description="Check if record is editable", type="boolean", example=true),
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
* @OA\Property(property="result", type="boolean", description="Status of successful transfer of the record to the recycle bin"),
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
$summaryInventory[$name] = \App\Fields\Currency::formatToDisplay($field->getSummaryValuesFromData($rawInventory), null, true);
- Exclude checks
Line exceeds 120 characters; contains 255 characters Open
* @OA\Property(property="fields", type="object", title="System field names and field labels", example={"field_name_1" : "Field label 1", "field_name_2" : "Field label 2", "assigned_user_id" : "Assigned user", "createdtime" : "Created time"},
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
* @OA\Property(property="result", type="object", title="Record data", description="Created record id and name.",
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
* @OA\Parameter(name="recordId", in="path", @OA\Schema(type="integer"), description="Record id", required=true, example=116),
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
* @OA\Property(property="name", type="string", description="Id of the newly created record", example="YetiForce Name"),
- Exclude checks
Line exceeds 120 characters; contains 163 characters Open
* @OA\Property(property="skippedData", type="object", description="List of parameters passed in the request that were skipped in the write process"),
- Exclude checks
Line exceeds 120 characters; contains 163 characters Open
* @OA\Property(property="skippedData", type="object", description="List of parameters passed in the request that were skipped in the write process"),
- Exclude checks
Line exceeds 120 characters; contains 169 characters Open
* example={"id" : 11, "field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : "YetiForce Administrator", "createdtime" : "2014-09-24 20:51"},
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
* example={"field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : 1, "createdtime" : "2014-09-24 20:51:12"},
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
* @OA\Parameter(name="moduleName", in="path", @OA\Schema(type="string"), description="Module name", required=true, example="Contacts"),
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
* @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true),
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
* @OA\Property(property="result", type="object", title="Record data", description="Created record id and name.",
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
* @OA\Property(property="name", type="string", description="Id of the newly created record", example="YetiForce Name"),
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
* @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"),
- Exclude checks
Line exceeds 120 characters; contains 148 characters Open
* example={"id" : 11, "field_name_1" : "Tom", "field_name_2" : "Kowalski", "assigned_user_id" : 1, "createdtime" : "2014-09-24 20:51:12"},
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
* description="The `id` value returned in the response can be used as the `recordId` parameter in `GET /webservice/{moduleName}/Record/{recordId}`.",
- Exclude checks