schmunk42\giiant\generators\model\Generator::generateHints PHP Метод

generateHints() публичный Метод

Generates the attribute hints for the specified table.
public generateHints ( yii\db\TableSchema $table ) : array
$table yii\db\TableSchema the table schema
Результат 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;
    }