code: 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;
      }
docs: [[@doctodo method_description:generateDescriptorField]].
  
  @param [[@doctodo param_type:table]] $table [[@doctodo param_description:table]]
  
  @return [[@doctodo return_type:generateDescriptorField]] [[@doctodo return_description:generateDescriptorField]]