|
@@ 148-158 (lines=11) @@
|
| 145 |
|
* @return bool|self[] True if material entities has been found and $return is passed |
| 146 |
|
* or self[] if only two parameters is passed. |
| 147 |
|
*/ |
| 148 |
|
public static function byFieldValue(QueryInterface $query, $fieldID, $fieldValue, &$return = array()) |
| 149 |
|
{ |
| 150 |
|
/** @var array $materialIds Collection of entity identifiers filtered by additional field */ |
| 151 |
|
$materialIds = null; |
| 152 |
|
if (static::idsByFieldValue($query, $fieldID, $fieldValue, $materialIds)) { |
| 153 |
|
static::byIDs($query, $materialIds, $return); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
// If only one argument is passed - return null, otherwise bool |
| 157 |
|
return func_num_args() > 3 ? sizeof($return) : $return; |
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
/** |
| 161 |
|
* Get current entity instances collection by navigation identifier. |
|
@@ 169-179 (lines=11) @@
|
| 166 |
|
* @return bool|self[] True if material entities has been found and $return is passed |
| 167 |
|
* or self[] if only two parameters is passed. |
| 168 |
|
*/ |
| 169 |
|
public static function byNavigationID(QueryInterface $query, $navigationID, &$return = array()) |
| 170 |
|
{ |
| 171 |
|
/** @var array $materialIds Collection of entity identifiers filtered by additional field */ |
| 172 |
|
$materialIds = null; |
| 173 |
|
if (static::idsByNavigationID($query, $navigationID, $materialIds)) { |
| 174 |
|
static::byIDs($query, $materialIds, $return); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
// If only one argument is passed - return null, otherwise bool |
| 178 |
|
return func_num_args() > 2 ? sizeof($return) : $return; |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
/** |
| 182 |
|
* Get current entity instances amount by navigation identifier. |
|
@@ 190-200 (lines=11) @@
|
| 187 |
|
* @return bool|self[] True if material entities has been found and $return is passed |
| 188 |
|
* or self[] if only two parameters is passed. |
| 189 |
|
*/ |
| 190 |
|
public static function amountByNavigationID(QueryInterface $query, $navigationID, &$return = array()) |
| 191 |
|
{ |
| 192 |
|
/** @var array $materialIds Collection of entity identifiers filtered by additional field */ |
| 193 |
|
$materialIds = null; |
| 194 |
|
if (static::idsByNavigationID($query, $navigationID, $materialIds)) { |
| 195 |
|
static::byIDs($query, $materialIds, $return, 'count'); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
|
// If only one argument is passed - return null, otherwise bool |
| 199 |
|
return func_num_args() > 2 ? sizeof($return) : $return; |
| 200 |
|
} |
| 201 |
|
|
| 202 |
|
/** |
| 203 |
|
* Get current entity instances collection by navigation identifier and additional field value. |