| Total Complexity | 6 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class BaseField extends QueryFields\BaseField |
||
| 22 | { |
||
| 23 | /** @var \Vtiger_Basic_InventoryField */ |
||
| 24 | protected $fieldModel; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor. |
||
| 28 | * |
||
| 29 | * @param \App\QueryGenerator $queryGenerator |
||
| 30 | * @param \Vtiger_Basic_InventoryField $fieldModel |
||
| 31 | * @param array|string $value |
||
| 32 | * @param string $operator |
||
| 33 | */ |
||
| 34 | public function __construct(\App\QueryGenerator $queryGenerator, $fieldModel = null) |
||
| 35 | { |
||
| 36 | $this->queryGenerator = $queryGenerator; |
||
| 37 | $this->fieldModel = $fieldModel; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get column name. |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getColumnName(): string |
||
| 46 | { |
||
| 47 | return $this->fullColumnName ? $this->fullColumnName : $this->fullColumnName = $this->getTableName() . '.' . $this->fieldModel->getColumnName(); |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Get table name. |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getTableName(): string |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Get field model. |
||
| 66 | * |
||
| 67 | * @return \Vtiger_Basic_InventoryField |
||
| 68 | */ |
||
| 69 | public function getField() |
||
| 72 | } |
||
| 73 | } |
||
| 74 |