¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.
admin_usergroup_fetch_data
The admin_usergroup_fetch_data
hook allows plugins to fetch and modify additional data
for a user group during data retrieval in the admin interface.
$hookData = DynamicHooks::executeHook('admin_usergroup_fetch_data', true, $recordId);
// Example Implementation
DynamicHooks::addHook('admin_usergroup_fetch_data', function ($userGroupId) use ($jakdb) {
$pluginId = $jakdb->get('plugins', 'id', ['name' => 'Your_Plugin_Name']);
$comment_access = $jakdb->get('plugin_data', 'meta_value', [
'plugin_item_id' => $userGroupId,
'plugin_id' => $pluginId,
'meta_key' => 'comment_access',
]);
return [
'comment_access' => $comment_access === '1' ? true : false,
];
}, 'your_plugin');