protected function getFieldItems(Field $field)
    {
        if ($field->hasForeignRelation() && $field->isOnFormView) {
            return sprintf('$%s', $field->getForeignRelation()->getCollectionName());
        }
        $labels = $field->getOptionsByLang();
        return sprintf('[%s]', implode(',' . PHP_EOL, $this->getKeyValueStringsFromLabels($labels)));
    }
protected function getFieldItems(Field $field)
    {
        if ($field->hasForeignRelation() && $field->isOnFormView) {
            return sprintf('$%s', $field->getForeignRelation()->getCollectionName());
        }
        $labels = $field->getOptionsByLang();
        return sprintf('[%s]', implode(',' . PHP_EOL, $this->getKeyValueStringsFromLabels($labels)));
    }
protected function getFieldItems ( Field $ field ) { if ( $ field -> hasForeignRelation ( ) && $ field -> isOnFormView ) { return sprintf ( '$%s' , $ field -> getForeignRelation ( ) -> getCollectionName ( ) ) ; } $ labels = $ field -> getOptionsByLang ( ) ; return sprintf ( '[%s]' , implode ( ',' . PHP_EOL , $ this -> getKeyValueStringsFromLabels ( $ labels ) ) ) ; }
It gets converts an array to a string based array for the views.

@param CrestApps\CodeGenerator\Models\Field $field

@return string
It gets converts an array to a string based array for the views .