src/Services/InputMaker.php
private function inputStringGenerator($config)
    {
        $config = $this->prepareObjectValue($config);
        $population = $this->inputCalibrator->getPopulation($config);
        $checkType = $this->inputCalibrator->checkType($config, $this->inputGroups['checkbox']);
        $selected = $this->inputCalibrator->isSelected($config, $checkType);
        $custom = $this->inputCalibrator->getField($config, 'custom');
        $method = $this->getGeneratorMethod($config['inputType']);

        if (in_array($method, $this->standardMethods)) {
            $inputString = $this->htmlGenerator->$method($config, $population, $custom);
        } elseif (in_array($method, $this->selectedMethods)) {
            // add extra class

            $inputString = $this->htmlGenerator->$method($config, $selected, $custom);
        } elseif ($method === 'makeRelationship') {
            $inputString = $this->htmlGenerator->makeRelationship(
                $config,
                $this->inputCalibrator->getField($config, 'label', 'name'),
                $this->inputCalibrator->getField($config, 'value', 'id'),
                $custom
            );
        } else {
            $config = $this->prepareType($config);
            $inputString = $this->htmlGenerator->makeHTMLInputString($config);
        }

        return $inputString;
    }
private function inputStringGenerator($config)
    {
        $config = $this->prepareObjectValue($config);
        $population = $this->inputCalibrator->getPopulation($config);
        $checkType = $this->inputCalibrator->checkType($config, $this->inputGroups['checkbox']);
        $selected = $this->inputCalibrator->isSelected($config, $checkType);
        $custom = $this->inputCalibrator->getField($config, 'custom');
        $method = $this->getGeneratorMethod($config['inputType']);

        if (in_array($method, $this->standardMethods)) {
            $inputString = $this->htmlGenerator->$method($config, $population, $custom);
        } elseif (in_array($method, $this->selectedMethods)) {
            // add extra class

            $inputString = $this->htmlGenerator->$method($config, $selected, $custom);
        } elseif ($method === 'makeRelationship') {
            $inputString = $this->htmlGenerator->makeRelationship(
                $config,
                $this->inputCalibrator->getField($config, 'label', 'name'),
                $this->inputCalibrator->getField($config, 'value', 'id'),
                $custom
            );
        } else {
            $config = $this->prepareType($config);
            $inputString = $this->htmlGenerator->makeHTMLInputString($config);
        }

        return $inputString;
    }
private function inputStringGenerator ( $ config ) { $ config = $ this -> prepareObjectValue ( $ config ) ; $ population = $ this -> inputCalibrator -> getPopulation ( $ config ) ; $ checkType = $ this -> inputCalibrator -> checkType ( $ config , $ this -> inputGroups [ 'checkbox' ] ) ; $ selected = $ this -> inputCalibrator -> isSelected ( $ config , $ checkType ) ; $ custom = $ this -> inputCalibrator -> getField ( $ config , 'custom' ) ; $ method = $ this -> getGeneratorMethod ( $ config [ 'inputType' ] ) ; if ( in_array ( $ method , $ this -> standardMethods ) ) { $ inputString = $ this -> htmlGenerator -> $ method ( $ config , $ population , $ custom ) ; } elseif ( in_array ( $ method , $ this -> selectedMethods ) ) { // add extra class $ inputString = $ this -> htmlGenerator -> $ method ( $ config , $ selected , $ custom ) ; } elseif ( $ method === 'makeRelationship' ) { $ inputString = $ this -> htmlGenerator -> makeRelationship ( $ config , $ this -> inputCalibrator -> getField ( $ config , 'label' , 'name' ) , $ this -> inputCalibrator -> getField ( $ config , 'value' , 'id' ) , $ custom ) ; } else { $ config = $ this -> prepareType ( $ config ) ; $ inputString = $ this -> htmlGenerator -> makeHTMLInputString ( $ config ) ; } return $ inputString ; }
The input string generator.

@param array $config Config

@return string
The input string generator .