original_string: public function _createElements() {
          if (!$this->has_customize_switch()) {
              $element = $this->createFormElement('hidden', 'customize', 1);
          } else {
              $element = $this->createFormElement('advcheckbox', 'customize', '', $this->_options['customlabel']);
          }
          $this->_elements[] = $element;
  
          if ($this->_options['type'] === 'text') {
              $element = $this->createFormElement($this->_options['type'], 'value',
                  get_string('newvaluefor', 'form', $this->getLabel()), $this->getAttributes());
              $element->setHiddenLabel(true);
          } else if ($this->_options['type'] === 'date_selector') {
              $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                  $this->getAttributes());
          } else if ($this->_options['type'] === 'date_time_selector') {
              $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                  $this->getAttributes());
          }
          $this->_elements[] = $element;
      }
code: public function _createElements() {
          if (!$this->has_customize_switch()) {
              $element = $this->createFormElement('hidden', 'customize', 1);
          } else {
              $element = $this->createFormElement('advcheckbox', 'customize', '', $this->_options['customlabel']);
          }
          $this->_elements[] = $element;
  
          if ($this->_options['type'] === 'text') {
              $element = $this->createFormElement($this->_options['type'], 'value',
                  get_string('newvaluefor', 'form', $this->getLabel()), $this->getAttributes());
              $element->setHiddenLabel(true);
          } else if ($this->_options['type'] === 'date_selector') {
              $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                  $this->getAttributes());
          } else if ($this->_options['type'] === 'date_time_selector') {
              $element = $this->createFormElement($this->_options['type'], 'value', '', $this->_options,
                  $this->getAttributes());
          }
          $this->_elements[] = $element;
      }
code_tokens: public function _createElements ( ) { if ( ! $ this -> has_customize_switch ( ) ) { $ element = $ this -> createFormElement ( 'hidden' , 'customize' , 1 ) ; } else { $ element = $ this -> createFormElement ( 'advcheckbox' , 'customize' , '' , $ this -> _options [ 'customlabel' ] ) ; } $ this -> _elements [ ] = $ element ; if ( $ this -> _options [ 'type' ] === 'text' ) { $ element = $ this -> createFormElement ( $ this -> _options [ 'type' ] , 'value' , get_string ( 'newvaluefor' , 'form' , $ this -> getLabel ( ) ) , $ this -> getAttributes ( ) ) ; $ element -> setHiddenLabel ( true ) ; } else if ( $ this -> _options [ 'type' ] === 'date_selector' ) { $ element = $ this -> createFormElement ( $ this -> _options [ 'type' ] , 'value' , '' , $ this -> _options , $ this -> getAttributes ( ) ) ; } else if ( $ this -> _options [ 'type' ] === 'date_time_selector' ) { $ element = $ this -> createFormElement ( $ this -> _options [ 'type' ] , 'value' , '' , $ this -> _options , $ this -> getAttributes ( ) ) ; } $ this -> _elements [ ] = $ element ; }
docstring: This will create all elements in the group
docstring_tokens: This will create all elements in the group