modX.logManagerAction
Последнее обновление Oct 11th, 2026 | История страницы | Улучшить эту страницу | Сообщить о проблеме
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 moremodX::logManagerAction¶
Создаёт и сохраняет запись modManagerLog для одного действия. Процессоры вызывают его сразу после изменения объекта, и строки появляются в разделе Reports → Manager Actions.
Пустые аргументы сохраняются так:
| Аргумент | Сохраняется как |
|---|---|
$action |
'unknown' |
$class_key |
'' |
$item |
'unknown' |
Метод возвращает сохранённый объект или null, если сохранение не удалось после записи об ошибке.
Синтаксис¶
modManagerLog|null logManagerAction (string $action, string $class_key, mixed $item, [int|null $userId = null])
-
$action(string) ключ действия, сохраняемый в строке -
$class_key(string) ключ класса затронутого объекта -
$item(mixed) идентификатор, сохраняемый какitem -
$userId(int|null) действующий пользователь; по умолчаниюnullберёт idmodX::$user
Пример¶
$log = $modx->logManagerAction('update_resource', modResource::class, 5);
if ($log === null) {
// строка не была сохранена
}
Смотрите также¶
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










