@@ 123-128 (lines=6) @@ | ||
120 | { |
|
121 | /** @var array $materialIds Collection of entity identifiers filtered by additional field */ |
|
122 | $materialIds = null; |
|
123 | if (static::idsByFieldValue($query, $fieldID, $fieldValue, $materialIds)) { |
|
124 | // Get material instances |
|
125 | $return = $query->entity(get_called_class()) |
|
126 | ->where('MaterialID', $materialIds) |
|
127 | ->exec(); |
|
128 | } |
|
129 | ||
130 | // If only one argument is passed - return null, otherwise bool |
|
131 | return func_num_args() > 3 ? $return == null : $return; |
|
@@ 180-185 (lines=6) @@ | ||
177 | /** @var array $materialIds Collection of entity identifiers filtered by additional field */ |
|
178 | $materialIds = null; |
|
179 | if (static::idsByNavigationID($query, $navigationID, $materialIds)) { |
|
180 | if (static::idsByFieldValue($query, $fieldID, $fieldValue, $materialIds, $materialIds)) { |
|
181 | // Get entities by filtered identifiers |
|
182 | $return = $query->entity(get_called_class()) |
|
183 | ->where('MaterialID', $materialIds) |
|
184 | ->exec(); |
|
185 | } |
|
186 | } |
|
187 | ||
188 | // If only one argument is passed - return null, otherwise bool |