| @@ 212-225 (lines=14) @@ | ||
| 209 | * |
|
| 210 | * @return AssignmentCollection |
|
| 211 | */ |
|
| 212 | public function locked() |
|
| 213 | { |
|
| 214 | $items = []; |
|
| 215 | ||
| 216 | foreach ($this->items as $item) { |
|
| 217 | if ($item instanceof AssignmentInterface && $field = $item->getField()) { |
|
| 218 | if ($field->isLocked()) { |
|
| 219 | $items[] = $item; |
|
| 220 | } |
|
| 221 | } |
|
| 222 | } |
|
| 223 | ||
| 224 | return new static($items); |
|
| 225 | } |
|
| 226 | ||
| 227 | /** |
|
| 228 | * Return only assignments with fields |
|
| @@ 233-246 (lines=14) @@ | ||
| 230 | * |
|
| 231 | * @return AssignmentCollection |
|
| 232 | */ |
|
| 233 | public function notLocked() |
|
| 234 | { |
|
| 235 | $items = []; |
|
| 236 | ||
| 237 | foreach ($this->items as $item) { |
|
| 238 | if ($item instanceof AssignmentInterface && $field = $item->getField()) { |
|
| 239 | if (!$field->isLocked()) { |
|
| 240 | $items[] = $item; |
|
| 241 | } |
|
| 242 | } |
|
| 243 | } |
|
| 244 | ||
| 245 | return new static($items); |
|
| 246 | } |
|
| 247 | ||
| 248 | /** |
|
| 249 | * An alias for notLocked(); |
|