| @@ 79-92 (lines=14) @@ | ||
| 76 | * |
|
| 77 | *@return $this Chaining |
|
| 78 | */ |
|
| 79 | public function select($fieldNames) |
|
| 80 | { |
|
| 81 | // Convert argument to array and iterate |
|
| 82 | foreach ((!is_array($fieldNames) ? array($fieldNames) : $fieldNames) as $fieldName) { |
|
| 83 | // Try to find entity additional field |
|
| 84 | $pointer = &static::$fieldNames[$fieldName]; |
|
| 85 | if (null !== $pointer) { |
|
| 86 | // Store selected additional field buy FieldID and Field name |
|
| 87 | $this->selectedFields[$pointer] = $fieldName; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | return $this; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * Set additional field for sorting. |
|
| @@ 69-82 (lines=14) @@ | ||
| 66 | * |
|
| 67 | * @return $this Chaining |
|
| 68 | */ |
|
| 69 | public function select($fieldNames) |
|
| 70 | { |
|
| 71 | // Convert argument to array and iterate |
|
| 72 | foreach ((!is_array($fieldNames) ? array($fieldNames) : $fieldNames) as $fieldName) { |
|
| 73 | // Try to find entity additional field |
|
| 74 | $pointer = &static::$fieldNames[$fieldName]; |
|
| 75 | if (null !== $pointer) { |
|
| 76 | // Store selected additional field buy FieldID and Field name |
|
| 77 | $this->selectedFields[$pointer] = $fieldName; |
|
| 78 | } |
|
| 79 | } |
|
| 80 | ||
| 81 | return $this; |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * Set field for sorting. |
|