Passed
Push — developer ( 3e6d7c...adc0a6 )
by Mariusz
19:16
created

Vtiger_GetMultiReference_Relation::getQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Main file that includes basic operations on relations.
4
 *
5
 * @package   Relation
6
 *
7
 * @copyright YetiForce S.A.
8
 * @license   YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com)
9
 * @author    Adrian Kon <[email protected]>
10
 */
11
12
/**
13
 * Vtiger_GetMultiReference_Relation class.
14
 */
15
class Vtiger_GetMultiReference_Relation extends \App\Relation\RelationAbstraction
16
{
17
	/** {@inheritdoc} */
18
	public function getRelationType(): int
19
	{
20
		return Vtiger_Relation_Model::RELATION_MR;
21
	}
22
23
	/** {@inheritdoc} */
24
	public function getQuery()
25
	{
26
		$relationField = $this->relationModel->getRelationField();
27
		$queryGenerator = $this->relationModel->getQueryGenerator();
28
		$queryGenerator->addCondition($relationField->getName(), $this->relationModel->getParentRecord()->getId(), 'c');
29
	}
30
31
	/** {@inheritdoc} */
32
	public function create(int $sourceRecordId, int $destinationRecordId): bool
33
	{
34
		return false;
35
	}
36
37
	/** {@inheritdoc} */
38
	public function transfer(int $relatedRecordId, int $fromRecordId, int $toRecordId): bool
39
	{
40
		return false;
41
	}
42
43
	/** {@inheritdoc} */
44
	public function delete(int $sourceRecordId, int $destinationRecordId): bool
45
	{
46
		return false;
47
	}
48
}
49