src/FieldHandlers/RelatedFieldTrait.php
protected function _getInputHelp(array $properties) : string
    {
        $config = (new ModuleConfig(ConfigType::MODULE(), $properties['controller']))->parseToArray();
        $typeaheadFields = !empty($config['table']['typeahead_fields']) ? $config['table']['typeahead_fields'] : [];
        // if no typeahead fields, use display field
        if (empty($typeaheadFields)) {
            $typeaheadFields = [$properties['displayField']];
        }

        $virtualFields = !empty($config['virtualFields']) ? $config['virtualFields'] : [];

        // extract virtual fields, if any
        $result = [];
        foreach ($typeaheadFields as $typeaheadField) {
            $fields = isset($virtualFields[$typeaheadField]) ?
                (array)$virtualFields[$typeaheadField] :
                [$typeaheadField];

            $result = array_merge($result, $fields);
        }

        return implode(', or ', array_map(function ($value) {
            return Inflector::humanize($value);
        }, $result));
    }
protected function _getInputHelp(array $properties) : string
    {
        $config = (new ModuleConfig(ConfigType::MODULE(), $properties['controller']))->parseToArray();
        $typeaheadFields = !empty($config['table']['typeahead_fields']) ? $config['table']['typeahead_fields'] : [];
        // if no typeahead fields, use display field
        if (empty($typeaheadFields)) {
            $typeaheadFields = [$properties['displayField']];
        }

        $virtualFields = !empty($config['virtualFields']) ? $config['virtualFields'] : [];

        // extract virtual fields, if any
        $result = [];
        foreach ($typeaheadFields as $typeaheadField) {
            $fields = isset($virtualFields[$typeaheadField]) ?
                (array)$virtualFields[$typeaheadField] :
                [$typeaheadField];

            $result = array_merge($result, $fields);
        }

        return implode(', or ', array_map(function ($value) {
            return Inflector::humanize($value);
        }, $result));
    }
protected function _getInputHelp ( array $ properties ) : string { $ config = ( new ModuleConfig ( ConfigType :: MODULE ( ) , $ properties [ 'controller' ] ) ) -> parseToArray ( ) ; $ typeaheadFields = ! empty ( $ config [ 'table' ] [ 'typeahead_fields' ] ) ? $ config [ 'table' ] [ 'typeahead_fields' ] : [ ] ; // if no typeahead fields, use display field if ( empty ( $ typeaheadFields ) ) { $ typeaheadFields = [ $ properties [ 'displayField' ] ] ; } $ virtualFields = ! empty ( $ config [ 'virtualFields' ] ) ? $ config [ 'virtualFields' ] : [ ] ; // extract virtual fields, if any $ result = [ ] ; foreach ( $ typeaheadFields as $ typeaheadField ) { $ fields = isset ( $ virtualFields [ $ typeaheadField ] ) ? ( array ) $ virtualFields [ $ typeaheadField ] : [ $ typeaheadField ] ; $ result = array_merge ( $ result , $ fields ) ; } return implode ( ', or ' , array_map ( function ( $ value ) { return Inflector :: humanize ( $ value ) ; } , $ result ) ) ; }
Generate input help string

Can be used as a value for placeholder or title attributes.

@param mixed[] $properties Input properties
@return string
Generate input help string