| @@ 23-30 (lines=8) @@ | ||
| 20 | * @param self $return Variable to return found database record |
|
| 21 | * @return bool|null|self Field instance or null if 3rd parameter not passed |
|
| 22 | */ |
|
| 23 | public static function byName(QueryInterface $query, $name, self & $return = null) |
|
| 24 | { |
|
| 25 | // Get field record by name column |
|
| 26 | $return = static::oneByColumn($query, 'Name', $name); |
|
| 27 | ||
| 28 | // If only one argument is passed - return null, otherwise bool |
|
| 29 | return func_num_args() > 1 ? $return == null : $return; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Find additional field database record by Name or ID. |
|
| @@ 172-179 (lines=8) @@ | ||
| 169 | * @param self[]|array|null $return Variable where request result would be returned |
|
| 170 | * @return bool|self[] True if material entities has been found |
|
| 171 | */ |
|
| 172 | public static function byUrl(QueryInterface $query, $url, & $return = array()) |
|
| 173 | { |
|
| 174 | // Get field record by identifier column |
|
| 175 | $return = static::collectionByColumn($query, 'Url', $url); |
|
| 176 | ||
| 177 | // If only one argument is passed - return null, otherwise bool |
|
| 178 | return func_num_args() > 1 ? $return == null : $return; |
|
| 179 | } |
|
| 180 | ||
| 181 | /** |
|
| 182 | * Set additional material field value by field identifier |
|