schmunk42\giiant\generators\model\Generator::generateHints PHP Method

generateHints() public method

Generates the attribute hints for the specified table.
public generateHints ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table schema
return array the generated attribute hints (name => hint) or an empty array if $this->generateHintsFromComments is false
    public function generateHints($table)
    {
        $hints = [];
        if ($this->generateHintsFromComments) {
            foreach ($table->columns as $column) {
                if (!empty($column->comment)) {
                    $hints[$column->name] = $column->comment;
                }
            }
        }
        return $hints;
    }