public function BlockService::sanitizeId in Opigno dashboard 3.x
Same name and namespace in other branches
- 8 src/BlockService.php \Drupal\opigno_dashboard\BlockService::sanitizeId()
Sanitizes ID string.
Parameters
string $id: The block ID to be sanitized.
Return value
string The sanitized block ID.
Overrides BlockServiceInterface::sanitizeId
2 calls to BlockService::sanitizeId()
- BlockService::createBlocksInstances in src/
BlockService.php - Creates blocks instances.
- BlockService::getAvailableBlocks in src/
BlockService.php - Returns available blocks.
File
- src/
BlockService.php, line 255
Class
- BlockService
- The dashboard block manager service definition.
Namespace
Drupal\opigno_dashboardCode
public function sanitizeId(string $id) : string {
return 'dashboard_' . str_replace([
':',
'-',
], [
'_',
'_',
], $id);
}