original_string: protected function add_collection_selector($mform) {
          $tagcolls = core_tag_collection::get_collections_menu(false, false, get_string('anycollection', 'block_tags'));
          if (count($tagcolls) <= 1) {
              return;
          }
  
          $tagcollssearchable = core_tag_collection::get_collections_menu(false, true);
          $hasunsearchable = false;
          foreach ($tagcolls as $id => $name) {
              if ($id && !array_key_exists($id, $tagcollssearchable)) {
                  $hasunsearchable = true;
                  $tagcolls[$id] = $name . '*';
              }
          }
  
          $mform->addElement('select', 'config_tagcoll', get_string('tagcollection', 'block_tags'), $tagcolls);
          if ($hasunsearchable) {
              $mform->addHelpButton('config_tagcoll', 'tagcollection', 'block_tags');
          }
          $mform->setDefault('config_tagcoll', 0);
      }
code: protected function add_collection_selector($mform) {
          $tagcolls = core_tag_collection::get_collections_menu(false, false, get_string('anycollection', 'block_tags'));
          if (count($tagcolls) <= 1) {
              return;
          }
  
          $tagcollssearchable = core_tag_collection::get_collections_menu(false, true);
          $hasunsearchable = false;
          foreach ($tagcolls as $id => $name) {
              if ($id && !array_key_exists($id, $tagcollssearchable)) {
                  $hasunsearchable = true;
                  $tagcolls[$id] = $name . '*';
              }
          }
  
          $mform->addElement('select', 'config_tagcoll', get_string('tagcollection', 'block_tags'), $tagcolls);
          if ($hasunsearchable) {
              $mform->addHelpButton('config_tagcoll', 'tagcollection', 'block_tags');
          }
          $mform->setDefault('config_tagcoll', 0);
      }
code_tokens: protected function add_collection_selector ( $ mform ) { $ tagcolls = core_tag_collection :: get_collections_menu ( false , false , get_string ( 'anycollection' , 'block_tags' ) ) ; if ( count ( $ tagcolls ) <= 1 ) { return ; } $ tagcollssearchable = core_tag_collection :: get_collections_menu ( false , true ) ; $ hasunsearchable = false ; foreach ( $ tagcolls as $ id => $ name ) { if ( $ id && ! array_key_exists ( $ id , $ tagcollssearchable ) ) { $ hasunsearchable = true ; $ tagcolls [ $ id ] = $ name . '*' ; } } $ mform -> addElement ( 'select' , 'config_tagcoll' , get_string ( 'tagcollection' , 'block_tags' ) , $ tagcolls ) ; if ( $ hasunsearchable ) { $ mform -> addHelpButton ( 'config_tagcoll' , 'tagcollection' , 'block_tags' ) ; } $ mform -> setDefault ( 'config_tagcoll' , 0 ) ; }
docstring: Add the tag collection selector
  
  @param object $mform the form being built.
docstring_tokens: Add the tag collection selector