original_string: public static function create_from_tag($tag) {
          $event = self::create(array(
              'objectid' => $tag->id,
              'relateduserid' => $tag->userid,
              'context' => \context_system::instance(),
              'other' => array(
                  'name' => $tag->name,
                  'rawname' => $tag->rawname
              )
          ));
          return $event;
      }
code: public static function create_from_tag($tag) {
          $event = self::create(array(
              'objectid' => $tag->id,
              'relateduserid' => $tag->userid,
              'context' => \context_system::instance(),
              'other' => array(
                  'name' => $tag->name,
                  'rawname' => $tag->rawname
              )
          ));
          return $event;
      }
code_tokens: public static function create_from_tag ( $ tag ) { $ event = self :: create ( array ( 'objectid' => $ tag -> id , 'relateduserid' => $ tag -> userid , 'context' => \ context_system :: instance ( ) , 'other' => array ( 'name' => $ tag -> name , 'rawname' => $ tag -> rawname ) ) ) ; return $ event ; }
docstring: Creates an event from tag object
  
  @since Moodle 3.1
  @param \core_tag_tag|\stdClass $tag
  @return tag_created
docstring_tokens: Creates an event from tag object