original_string: public function relationRender($field, $options = [])
      {
          /*
           * Session key
           */
          if (is_string($options)) {
              $options = ['sessionKey' => $options];
          }
  
          if (isset($options['sessionKey'])) {
              $this->sessionKey = $options['sessionKey'];
          }
  
          /*
           * Apply options and extra config
           */
          $allowConfig = ['readOnly', 'recordUrl', 'recordOnClick'];
          $extraConfig = array_only($options, $allowConfig);
          $this->extraConfig = $extraConfig;
          $this->applyExtraConfig($extraConfig, $field);
  
          /*
           * Initialize
           */
          $this->validateField($field);
          $this->prepareVars();
  
          /*
           * Determine the partial to use based on the supplied section option
           */
          $section = $options['section'] ?? null;
          switch (strtolower($section)) {
              case 'toolbar':
                  return $this->toolbarWidget ? $this->toolbarWidget->render() : null;
  
              case 'view':
                  return $this->relationMakePartial('view');
  
              default:
                  return $this->relationMakePartial('container');
          }
      }
code: public function relationRender($field, $options = [])
      {
          /*
           * Session key
           */
          if (is_string($options)) {
              $options = ['sessionKey' => $options];
          }
  
          if (isset($options['sessionKey'])) {
              $this->sessionKey = $options['sessionKey'];
          }
  
          /*
           * Apply options and extra config
           */
          $allowConfig = ['readOnly', 'recordUrl', 'recordOnClick'];
          $extraConfig = array_only($options, $allowConfig);
          $this->extraConfig = $extraConfig;
          $this->applyExtraConfig($extraConfig, $field);
  
          /*
           * Initialize
           */
          $this->validateField($field);
          $this->prepareVars();
  
          /*
           * Determine the partial to use based on the supplied section option
           */
          $section = $options['section'] ?? null;
          switch (strtolower($section)) {
              case 'toolbar':
                  return $this->toolbarWidget ? $this->toolbarWidget->render() : null;
  
              case 'view':
                  return $this->relationMakePartial('view');
  
              default:
                  return $this->relationMakePartial('container');
          }
      }
code_tokens: public function relationRender ( $ field , $ options = [ ] ) { /*
           * Session key
           */ if ( is_string ( $ options ) ) { $ options = [ 'sessionKey' => $ options ] ; } if ( isset ( $ options [ 'sessionKey' ] ) ) { $ this -> sessionKey = $ options [ 'sessionKey' ] ; } /*
           * Apply options and extra config
           */ $ allowConfig = [ 'readOnly' , 'recordUrl' , 'recordOnClick' ] ; $ extraConfig = array_only ( $ options , $ allowConfig ) ; $ this -> extraConfig = $ extraConfig ; $ this -> applyExtraConfig ( $ extraConfig , $ field ) ; /*
           * Initialize
           */ $ this -> validateField ( $ field ) ; $ this -> prepareVars ( ) ; /*
           * Determine the partial to use based on the supplied section option
           */ $ section = $ options [ 'section' ] ?? null ; switch ( strtolower ( $ section ) ) { case 'toolbar' : return $ this -> toolbarWidget ? $ this -> toolbarWidget -> render ( ) : null ; case 'view' : return $ this -> relationMakePartial ( 'view' ) ; default : return $ this -> relationMakePartial ( 'container' ) ; } }
docstring: Renders the relationship manager.
  @param string $field The relationship field.
  @param array $options
  @return string Rendered HTML for the relationship manager.
docstring_tokens: Renders the relationship manager .