xPDOManager.addField
Последнее обновление not available | История страницы | Улучшить эту страницу | Сообщить о проблеме
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn morexPDOManager::addField¶
Добавляет столбец в таблицу класса. Массив $options описывает столбец; допустимые ключи смотрите в getColumnDef() в менеджере драйвера.
Синтаксис¶
boolean addField (string $class, string $name, [array $options = array()])
Пример¶
$manager = $xpdo->getManager();
$manager->addField('MyVendor\\MyPackage\\MyModel', 'subtitle', array(
'dbtype' => 'varchar',
'precision' => '255',
'phptype' => 'string',
'null' => true,
));
Смотрите также¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










