original_string: public static function create_framework(stdClass $record) {
          static::require_enabled();
          $framework = new competency_framework(0, $record);
          require_capability('moodle/competency:competencymanage', $framework->get_context());
  
          // Account for different formats of taxonomies.
          if (isset($record->taxonomies)) {
              $framework->set('taxonomies', $record->taxonomies);
          }
  
          $framework = $framework->create();
  
          // Trigger a competency framework created event.
          \core\event\competency_framework_created::create_from_framework($framework)->trigger();
  
          return $framework;
      }
code: public static function create_framework(stdClass $record) {
          static::require_enabled();
          $framework = new competency_framework(0, $record);
          require_capability('moodle/competency:competencymanage', $framework->get_context());
  
          // Account for different formats of taxonomies.
          if (isset($record->taxonomies)) {
              $framework->set('taxonomies', $record->taxonomies);
          }
  
          $framework = $framework->create();
  
          // Trigger a competency framework created event.
          \core\event\competency_framework_created::create_from_framework($framework)->trigger();
  
          return $framework;
      }
code_tokens: public static function create_framework ( stdClass $ record ) { static :: require_enabled ( ) ; $ framework = new competency_framework ( 0 , $ record ) ; require_capability ( 'moodle/competency:competencymanage' , $ framework -> get_context ( ) ) ; // Account for different formats of taxonomies. if ( isset ( $ record -> taxonomies ) ) { $ framework -> set ( 'taxonomies' , $ record -> taxonomies ) ; } $ framework = $ framework -> create ( ) ; // Trigger a competency framework created event. \ core \ event \ competency_framework_created :: create_from_framework ( $ framework ) -> trigger ( ) ; return $ framework ; }
docstring: Create a competency framework from a record containing all the data for the class.
  
  Requires moodle/competency:competencymanage capability at the system context.
  
  @param stdClass $record Record containing all the data for an instance of the class.
  @return competency_framework
docstring_tokens: Create a competency framework from a record containing all the data for the class .