lib/gii/cascadeTypeModule/Generator.php
public function generateDescriptorField($table)
    {
        $field = '';
        if (!empty($this->descriptorField)) {
            if (strpos($this->descriptorField, ',') === false) {
                $field = "\tpublic \$descriptorField = '{$this->descriptorField}';\n";
            } else {
                $parts = explode(',', str_replace(' ', '', $this->descriptorField));
                $field = "\tpublic \$descriptorField = ['" . implode("', '", $parts) . "'];\n";
            }
        } else {
            $check = ['name', 'title'];
            foreach ($check as $column) {
                if (isset($table->columns[$column])) {
                    $field = "\tpublic \$descriptorField = '$column';\n";
                }
            }
        }

        return $field;
    }
public function generateDescriptorField($table)
    {
        $field = '';
        if (!empty($this->descriptorField)) {
            if (strpos($this->descriptorField, ',') === false) {
                $field = "\tpublic \$descriptorField = '{$this->descriptorField}';\n";
            } else {
                $parts = explode(',', str_replace(' ', '', $this->descriptorField));
                $field = "\tpublic \$descriptorField = ['" . implode("', '", $parts) . "'];\n";
            }
        } else {
            $check = ['name', 'title'];
            foreach ($check as $column) {
                if (isset($table->columns[$column])) {
                    $field = "\tpublic \$descriptorField = '$column';\n";
                }
            }
        }

        return $field;
    }
[[@doctodo method_description:generateDescriptorField]].

@param [[@doctodo param_type:table]] $table [[@doctodo param_description:table]]

@return [[@doctodo return_type:generateDescriptorField]] [[@doctodo return_description:generateDescriptorField]]