| @@ 316-331 (lines=16) @@ | ||
| 313 | foreach ($allSelections as $index => $selection) { |
|
| 314 | $allSelections[$index]['active'] = in_array($selection['id'], $selected); |
|
| 315 | } |
|
| 316 | if (null !== $allSelections) { |
|
| 317 | Yii::$app->cache->set( |
|
| 318 | $cacheKey, |
|
| 319 | $allSelections, |
|
| 320 | 0, |
|
| 321 | new TagDependency( |
|
| 322 | [ |
|
| 323 | 'tags' => [ |
|
| 324 | ActiveRecordHelper::getCommonTag(PropertyStaticValues::className()), |
|
| 325 | ActiveRecordHelper::getCommonTag(Property::className()), |
|
| 326 | ] |
|
| 327 | ||
| 328 | ] |
|
| 329 | ) |
|
| 330 | ); |
|
| 331 | } |
|
| 332 | } |
|
| 333 | return $allSelections; |
|
| 334 | } |
|
| @@ 371-386 (lines=16) @@ | ||
| 368 | 'name' => SORT_ASC |
|
| 369 | ] |
|
| 370 | )->asArray()->all(); |
|
| 371 | if (null !== $values) { |
|
| 372 | Yii::$app->cache->set( |
|
| 373 | $cacheKey, |
|
| 374 | $values, |
|
| 375 | 0, |
|
| 376 | new TagDependency( |
|
| 377 | [ |
|
| 378 | 'tags' => [ |
|
| 379 | ActiveRecordHelper::getCommonTag(PropertyStaticValues::className()), |
|
| 380 | ActiveRecordHelper::getCommonTag(Property::className()), |
|
| 381 | ] |
|
| 382 | ||
| 383 | ] |
|
| 384 | ) |
|
| 385 | ); |
|
| 386 | } |
|
| 387 | } |
|
| 388 | return $values; |
|
| 389 | } |
|