original_string: public function Field($properties = [])
      {
          Requirements::javascript("silvercommerce/geozones: client/dist/js/RegionSelectionField.min.js");
  
          $country_field = $this->country_field;
          
          // Get source based on selected country (or current/default locale)
          $field = $this
              ->getForm()
              ->Fields()
              ->dataFieldByName($country_field);
          
          // Add reference to base field
          $this
              ->setAttribute("data-region-field", true)
              ->setAttribute("data-country-field", $field->ID())
              ->setAttribute("data-link", $this->Link("regionslist"));
          
          if ($this->getHasEmptyDefault()) {
              $this->setAttribute("data-empty-string", $this->getEmptyString());
          }
  
          return parent::Field($properties);
      }
code: public function Field($properties = [])
      {
          Requirements::javascript("silvercommerce/geozones: client/dist/js/RegionSelectionField.min.js");
  
          $country_field = $this->country_field;
          
          // Get source based on selected country (or current/default locale)
          $field = $this
              ->getForm()
              ->Fields()
              ->dataFieldByName($country_field);
          
          // Add reference to base field
          $this
              ->setAttribute("data-region-field", true)
              ->setAttribute("data-country-field", $field->ID())
              ->setAttribute("data-link", $this->Link("regionslist"));
          
          if ($this->getHasEmptyDefault()) {
              $this->setAttribute("data-empty-string", $this->getEmptyString());
          }
  
          return parent::Field($properties);
      }
code_tokens: public function Field ( $ properties = [ ] ) { Requirements :: javascript ( "silvercommerce/geozones: client/dist/js/RegionSelectionField.min.js" ) ; $ country_field = $ this -> country_field ; // Get source based on selected country (or current/default locale) $ field = $ this -> getForm ( ) -> Fields ( ) -> dataFieldByName ( $ country_field ) ; // Add reference to base field $ this -> setAttribute ( "data-region-field" , true ) -> setAttribute ( "data-country-field" , $ field -> ID ( ) ) -> setAttribute ( "data-link" , $ this -> Link ( "regionslist" ) ) ; if ( $ this -> getHasEmptyDefault ( ) ) { $ this -> setAttribute ( "data-empty-string" , $ this -> getEmptyString ( ) ) ; } return parent :: Field ( $ properties ) ; }
docstring: Render the final field
docstring_tokens: Render the final field