original_string: public function onPasteButtonCallback(DataContainer $dc, array $row, $table, $cr, array $clipboard = null)
      {
          $disablePA = false;
          $disablePI = false;
  
          // Disable all buttons if there is a circular reference
          if (null !== $clipboard && (
                  ('cut' === $clipboard['mode'] && ($cr || (int) $clipboard['id'] === (int) $row['id']))
                  || ('cutAll' === $clipboard['mode'] && ($cr || \in_array((int) $row['id'], \array_map('intval', $clipboard['id']), true)))
              )
          ) {
              $disablePA = true;
              $disablePI = true;
          }
  
          $return = '';
  
          if ($row['id'] > 0) {
              $return = $this->generatePasteImage('pasteafter', $disablePA, $table, $row, $clipboard);
          }
  
          return $return.$this->generatePasteImage('pasteinto', $disablePI, $table, $row, $clipboard);
      }
code: public function onPasteButtonCallback(DataContainer $dc, array $row, $table, $cr, array $clipboard = null)
      {
          $disablePA = false;
          $disablePI = false;
  
          // Disable all buttons if there is a circular reference
          if (null !== $clipboard && (
                  ('cut' === $clipboard['mode'] && ($cr || (int) $clipboard['id'] === (int) $row['id']))
                  || ('cutAll' === $clipboard['mode'] && ($cr || \in_array((int) $row['id'], \array_map('intval', $clipboard['id']), true)))
              )
          ) {
              $disablePA = true;
              $disablePI = true;
          }
  
          $return = '';
  
          if ($row['id'] > 0) {
              $return = $this->generatePasteImage('pasteafter', $disablePA, $table, $row, $clipboard);
          }
  
          return $return.$this->generatePasteImage('pasteinto', $disablePI, $table, $row, $clipboard);
      }
code_tokens: public function onPasteButtonCallback ( DataContainer $ dc , array $ row , $ table , $ cr , array $ clipboard = null ) { $ disablePA = false ; $ disablePI = false ; // Disable all buttons if there is a circular reference if ( null !== $ clipboard && ( ( 'cut' === $ clipboard [ 'mode' ] && ( $ cr || ( int ) $ clipboard [ 'id' ] === ( int ) $ row [ 'id' ] ) ) || ( 'cutAll' === $ clipboard [ 'mode' ] && ( $ cr || \ in_array ( ( int ) $ row [ 'id' ] , \ array_map ( 'intval' , $ clipboard [ 'id' ] ) , true ) ) ) ) ) { $ disablePA = true ; $ disablePI = true ; } $ return = '' ; if ( $ row [ 'id' ] > 0 ) { $ return = $ this -> generatePasteImage ( 'pasteafter' , $ disablePA , $ table , $ row , $ clipboard ) ; } return $ return . $ this -> generatePasteImage ( 'pasteinto' , $ disablePI , $ table , $ row , $ clipboard ) ; }
docstring: On paste button callback.
  
  @param DataContainer $dc
  @param array         $row
  @param string        $table
  @param bool          $cr
  @param array|null    $clipboard
  
  @return string
docstring_tokens: On paste button callback .