| @@ 304-319 (lines=16) @@ | ||
| 301 | foreach ($allSelections as $index => $selection) { |
|
| 302 | $allSelections[$index]['active'] = in_array($selection['id'], $selected); |
|
| 303 | } |
|
| 304 | if (null !== $allSelections) { |
|
| 305 | Yii::$app->cache->set( |
|
| 306 | $cacheKey, |
|
| 307 | $allSelections, |
|
| 308 | 0, |
|
| 309 | new TagDependency( |
|
| 310 | [ |
|
| 311 | 'tags' => [ |
|
| 312 | ActiveRecordHelper::getCommonTag(PropertyStaticValues::className()), |
|
| 313 | ActiveRecordHelper::getCommonTag(Property::className()), |
|
| 314 | ] |
|
| 315 | ||
| 316 | ] |
|
| 317 | ) |
|
| 318 | ); |
|
| 319 | } |
|
| 320 | } |
|
| 321 | return $allSelections; |
|
| 322 | } |
|
| @@ 358-373 (lines=16) @@ | ||
| 355 | 'name' => SORT_ASC |
|
| 356 | ] |
|
| 357 | )->asArray()->all(); |
|
| 358 | if (null !== $values) { |
|
| 359 | Yii::$app->cache->set( |
|
| 360 | $cacheKey, |
|
| 361 | $values, |
|
| 362 | 0, |
|
| 363 | new TagDependency( |
|
| 364 | [ |
|
| 365 | 'tags' => [ |
|
| 366 | ActiveRecordHelper::getCommonTag(PropertyStaticValues::className()), |
|
| 367 | ActiveRecordHelper::getCommonTag(Property::className()), |
|
| 368 | ] |
|
| 369 | ||
| 370 | ] |
|
| 371 | ) |
|
| 372 | ); |
|
| 373 | } |
|
| 374 | } |
|
| 375 | return $values; |
|
| 376 | } |
|