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

generateTimestamp() защищенный Метод

protected generateTimestamp ( yii\db\TableSchema $table ) : string[]
$table yii\db\TableSchema the table schema
Результат string[]
    protected function generateTimestamp($table)
    {
        $createdAt = $table->getColumn($this->createdAtColumn) !== null ? $this->createdAtColumn : false;
        $updatedAt = $table->getColumn($this->updatedAtColumn) !== null ? $this->updatedAtColumn : false;
        if ($this->useTimestampBehavior && ($createdAt || $updatedAt)) {
            return ['createdAtAttribute' => $createdAt, 'updatedAtAttribute' => $updatedAt];
        }
        return [];
    }