original_string: public function getTooltipMsgForAttribute($param) {
          $param_arr = json_decode($param, true);
          $msg_array = array();
          foreach ($this->xmlContent as $msg) {
              if ($msg->getAttribute('uicomponent') == 'tooltip' &&
                      $msg->getAttribute('targetcontroller') == $param_arr['targetcontroller'] &&
                      $msg->getAttribute('targetaction') == $param_arr['targetaction'] &&
                      in_array($msg->getAttribute('targetattr'), $param_arr['targetattr'])
              ) {
                  //Check if delay exists as an attribute
                  $delayshow = $msg->getAttribute('delayshow');
                  if ($delayshow != '') {
                      //Check if delayhide exists in xml, then use it, else use 0 by default
                      $delayhide = ($msg->getAttribute('delayhide') != '') ? $msg->getAttribute('delayhide') : 0;
  
                      $msgconfig_arr = array('value' => $msg->getAttribute('value'), 'targetattr' => $msg->getAttribute('targetattr'), 'placement' => $msg->getAttribute('placement'), 'delayshow' => $delayshow, 'delayhide' => $delayhide);
                  } else {
                      $msgconfig_arr = array('value' => $msg->getAttribute('value'), 'targetattr' => $msg->getAttribute('targetattr'), 'placement' => $msg->getAttribute('placement'));
                  }
                  array_push($msg_array, array('tooltipmsg' => $msgconfig_arr));
              }
          }
  
          return $msg_array;
      }
code: public function getTooltipMsgForAttribute($param) {
          $param_arr = json_decode($param, true);
          $msg_array = array();
          foreach ($this->xmlContent as $msg) {
              if ($msg->getAttribute('uicomponent') == 'tooltip' &&
                      $msg->getAttribute('targetcontroller') == $param_arr['targetcontroller'] &&
                      $msg->getAttribute('targetaction') == $param_arr['targetaction'] &&
                      in_array($msg->getAttribute('targetattr'), $param_arr['targetattr'])
              ) {
                  //Check if delay exists as an attribute
                  $delayshow = $msg->getAttribute('delayshow');
                  if ($delayshow != '') {
                      //Check if delayhide exists in xml, then use it, else use 0 by default
                      $delayhide = ($msg->getAttribute('delayhide') != '') ? $msg->getAttribute('delayhide') : 0;
  
                      $msgconfig_arr = array('value' => $msg->getAttribute('value'), 'targetattr' => $msg->getAttribute('targetattr'), 'placement' => $msg->getAttribute('placement'), 'delayshow' => $delayshow, 'delayhide' => $delayhide);
                  } else {
                      $msgconfig_arr = array('value' => $msg->getAttribute('value'), 'targetattr' => $msg->getAttribute('targetattr'), 'placement' => $msg->getAttribute('placement'));
                  }
                  array_push($msg_array, array('tooltipmsg' => $msgconfig_arr));
              }
          }
  
          return $msg_array;
      }
code_tokens: public function getTooltipMsgForAttribute ( $ param ) { $ param_arr = json_decode ( $ param , true ) ; $ msg_array = array ( ) ; foreach ( $ this -> xmlContent as $ msg ) { if ( $ msg -> getAttribute ( 'uicomponent' ) == 'tooltip' && $ msg -> getAttribute ( 'targetcontroller' ) == $ param_arr [ 'targetcontroller' ] && $ msg -> getAttribute ( 'targetaction' ) == $ param_arr [ 'targetaction' ] && in_array ( $ msg -> getAttribute ( 'targetattr' ) , $ param_arr [ 'targetattr' ] ) ) { //Check if delay exists as an attribute $ delayshow = $ msg -> getAttribute ( 'delayshow' ) ; if ( $ delayshow != '' ) { //Check if delayhide exists in xml, then use it, else use 0 by default $ delayhide = ( $ msg -> getAttribute ( 'delayhide' ) != '' ) ? $ msg -> getAttribute ( 'delayhide' ) : 0 ; $ msgconfig_arr = array ( 'value' => $ msg -> getAttribute ( 'value' ) , 'targetattr' => $ msg -> getAttribute ( 'targetattr' ) , 'placement' => $ msg -> getAttribute ( 'placement' ) , 'delayshow' => $ delayshow , 'delayhide' => $ delayhide ) ; } else { $ msgconfig_arr = array ( 'value' => $ msg -> getAttribute ( 'value' ) , 'targetattr' => $ msg -> getAttribute ( 'targetattr' ) , 'placement' => $ msg -> getAttribute ( 'placement' ) ) ; } array_push ( $ msg_array , array ( 'tooltipmsg' => $ msgconfig_arr ) ) ; } } return $ msg_array ; }
docstring: Fetches all messages associated with a particular
  attribute passed through the JSON var param.
docstring_tokens: Fetches all messages associated with a particular attribute passed through the JSON var param .