portal.mkgtu.ru/common/db/views/_createTable.php

22 lines
413 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?php
?> $this->createTable('<?= $table ?>', [
<?php foreach ($fields as $field):
if (empty($field['decorators'])): ?>
'<?= $field['property'] ?>',
<?php else: ?>
<?= "'{$field['property']}' => \$this->{$field['decorators']}" ?>,
<?php endif;
endforeach; ?>
]);
<?= $this->render('_addForeignKeys', [
'table' => $table,
'foreignKeys' => $foreignKeys,
]);