original_string: public function get_emoticons($selectable = false) {
          global $CFG;
          $notselectable = ['martin', 'egg'];
  
          if (empty($CFG->emoticons)) {
              return array();
          }
  
          $emoticons = $this->decode_stored_config($CFG->emoticons);
  
          if (!is_array($emoticons)) {
              // Something is wrong with the format of stored setting.
              debugging('Invalid format of emoticons setting, please resave the emoticons settings form', DEBUG_NORMAL);
              return array();
          }
          if ($selectable) {
              foreach ($emoticons as $index => $emote) {
                  if (in_array($emote->altidentifier, $notselectable)) {
                      // Skip this one.
                      unset($emoticons[$index]);
                  }
              }
          }
  
          return $emoticons;
      }
code: public function get_emoticons($selectable = false) {
          global $CFG;
          $notselectable = ['martin', 'egg'];
  
          if (empty($CFG->emoticons)) {
              return array();
          }
  
          $emoticons = $this->decode_stored_config($CFG->emoticons);
  
          if (!is_array($emoticons)) {
              // Something is wrong with the format of stored setting.
              debugging('Invalid format of emoticons setting, please resave the emoticons settings form', DEBUG_NORMAL);
              return array();
          }
          if ($selectable) {
              foreach ($emoticons as $index => $emote) {
                  if (in_array($emote->altidentifier, $notselectable)) {
                      // Skip this one.
                      unset($emoticons[$index]);
                  }
              }
          }
  
          return $emoticons;
      }
code_tokens: public function get_emoticons ( $ selectable = false ) { global $ CFG ; $ notselectable = [ 'martin' , 'egg' ] ; if ( empty ( $ CFG -> emoticons ) ) { return array ( ) ; } $ emoticons = $ this -> decode_stored_config ( $ CFG -> emoticons ) ; if ( ! is_array ( $ emoticons ) ) { // Something is wrong with the format of stored setting. debugging ( 'Invalid format of emoticons setting, please resave the emoticons settings form' , DEBUG_NORMAL ) ; return array ( ) ; } if ( $ selectable ) { foreach ( $ emoticons as $ index => $ emote ) { if ( in_array ( $ emote -> altidentifier , $ notselectable ) ) { // Skip this one. unset ( $ emoticons [ $ index ] ) ; } } } return $ emoticons ; }
docstring: Returns the currently enabled emoticons
  
  @param boolean $selectable - If true, only return emoticons that should be selectable from a list.
  @return array of emoticon objects
docstring_tokens: Returns the currently enabled emoticons