protected CheckProvider::loadDynamicRequirementMap()
Compiles a mapping of requirement keys to access checker service IDs.
File
- core/lib/Drupal/Core/Access/CheckProvider.php, line 148
Class
- CheckProvider
- Loads access checkers from the container.
Namespace
Drupal\Core\Access
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | protected function loadDynamicRequirementMap() { if (isset( $this ->dynamicRequirementMap)) { return ; } // Set them here, so we can use the isset() check above. $this ->dynamicRequirementMap = array (); foreach ( $this ->checkIds as $service_id ) { if ( empty ( $this ->checks[ $service_id ])) { $this ->loadCheck( $service_id ); } // Add the service ID to an array that will be iterated over. if ( $this ->checks[ $service_id ] instanceof AccessCheckInterface) { $this ->dynamicRequirementMap[] = $service_id ; } } } |
Please login to continue.