Quick developer reference for the most common public functions and event hooks.
Structure Reading Time
$structure_minutes = brm_get_structure_reading_time_minutes( 'course_tree' );
$learning_minutes = brm_get_structure_reading_time_minutes( 'course_tree', true );
$module_minutes = brm_get_structure_scope_reading_time_minutes( $module_post_id, true );
Reading-time totals are owned by StructureReadingTimeReadService. The second argument includes saved brm_video_duration values in the total; it does not call video providers during render. Equivalent Bricks dynamic tags include {brm_post:reading_time:toplevel:minutes}, {brm_post:reading_time:toplevel:minutes:with_video}, and {brm_post:reading_time:toplevel:human:with_video}.
Use brm_post_reading_time_words_per_minute to adjust the text reading-speed divisor, brm_post_reading_time_duration_label to customize compact labels such as 29mins or 1hr 30min, brm_structure_reading_time_include_video_duration to opt video duration in or out, and brm_structure_reading_time_video_duration_seconds only for local stored-duration overrides.
User Levels and Access
$levels = brm_get_user_levels( $user_id );
$required = brm_get_post_required_levels( $post_id );
$has_access = brm_can_user_access_content_now( $user_id, $post_id );
brm_add_user_level( $user_id, $level_id );
brm_remove_user_level( $user_id, $level_id );
brm_set_post_levels( $post_id, [ 1, 2 ] );
Progress
brm_mark_content_completed( $user_id, $post_id );
brm_mark_content_incomplete( $user_id, $post_id );
$is_completed = brm_is_content_completed( $user_id, $post_id );
$date = brm_get_completion_date( $user_id, $post_id );
$completed_posts = \BaselMedia\BricksMembers\Modules\Progress\ProgressCompletionReadService::get_instance()->get_completed_post_ids_for_user( $user_id );
Actions
use BaselMedia\BricksMembers\Core\Event;
add_action( 'brm_event_access_granted', function( Event $event ) {
$user_id = $event->get_user_id();
$level_id = $event->get_resource_id();
// React to level assignment.
} );
add_action( 'brm_event_progress_completed', function( Event $event ) {
$user_id = $event->get_user_id();
$post_id = $event->get_resource_id();
// React to a direct completion.
} );
Use hooks and public APIs. Do not patch normalized tables or derived projection rows directly unless you are working inside the owning service layer.