aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorkasimi <mail@kasimi.net>2017-11-08 18:00:52 +0100
committerkasimi <mail@kasimi.net>2017-11-08 18:00:52 +0100
commitb9254cfda85171a70b6c93c992439ae2f492ef65 (patch)
tree463f1e108a72a579da4b55ca279f4f27a044d866 /phpBB/includes/acp
parent2c01fe67e9313565741f20d207ffb289b1d0b2d3 (diff)
downloadforums-b9254cfda85171a70b6c93c992439ae2f492ef65.tar
forums-b9254cfda85171a70b6c93c992439ae2f492ef65.tar.gz
forums-b9254cfda85171a70b6c93c992439ae2f492ef65.tar.bz2
forums-b9254cfda85171a70b6c93c992439ae2f492ef65.tar.xz
forums-b9254cfda85171a70b6c93c992439ae2f492ef65.zip
[ticket/15447] Add event core.acp_profile_modify_profile_row
PHPBB3-15447
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_profile.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 18dde382ca..d3daf63bd6 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -762,7 +762,8 @@ class acp_profile
continue;
}
$profile_field = $this->type_collection[$row['field_type']];
- $template->assign_block_vars('fields', array(
+
+ $field_block = array(
'FIELD_IDENT' => $row['field_ident'],
'FIELD_TYPE' => $profile_field->get_name(),
@@ -774,8 +775,26 @@ class acp_profile
'U_MOVE_UP' => $this->u_action . "&amp;action=move_up&amp;field_id=$id" . '&amp;hash=' . generate_link_hash('acp_profile'),
'U_MOVE_DOWN' => $this->u_action . "&amp;action=move_down&amp;field_id=$id" . '&amp;hash=' . generate_link_hash('acp_profile'),
- 'S_NEED_EDIT' => $s_need_edit)
+ 'S_NEED_EDIT' => $s_need_edit,
+ );
+
+ /**
+ * Event to modify profile field data before it is assigned to the template
+ *
+ * @event core.acp_profile_modify_profile_row
+ * @var array row Array with data for the current profile field
+ * @var array field_block Template data that is being assigned to the 'fields' block
+ * @var object profile_field A profile field instance, implements \phpbb\profilefields\type\type_base
+ * @since 3.2.2-RC1
+ */
+ $vars = array(
+ 'row',
+ 'field_block',
+ 'profile_field',
);
+ extract($phpbb_dispatcher->trigger_event('core.acp_profile_modify_profile_row', compact($vars)));
+
+ $template->assign_block_vars('fields', $field_block);
}
$db->sql_freeresult($result);