From cbad102f88d285ae64e65bf10cddfdf2c615f138 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 2 Feb 2014 16:20:02 +0100 Subject: [ticket/11201] Split template file into multiple files PHPBB3-11201 --- phpBB/phpbb/profilefields/type/type_base.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'phpBB/phpbb/profilefields') diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php index 248a89e5ac..95e9b8768b 100644 --- a/phpBB/phpbb/profilefields/type/type_base.php +++ b/phpBB/phpbb/profilefields/type/type_base.php @@ -60,6 +60,14 @@ abstract class type_base implements type_interface return 'profilefields.type.' . $this->get_name_short(); } + /** + * {@inheritDoc} + */ + public function get_template_filename() + { + return 'profilefields/' . $this->get_name_short() . '.html'; + } + /** * {@inheritDoc} */ @@ -153,7 +161,7 @@ abstract class type_base implements type_interface // set template filename $this->template->set_filenames(array( - 'cp_' . $this->get_name_short() . '_body' => 'custom_profile_fields.html', + 'cp_body' => $this->get_template_filename(), )); // empty previously filled blockvars @@ -162,6 +170,6 @@ abstract class type_base implements type_interface // Assign template variables $this->generate_field($profile_row, $preview_options); - return $this->template->assign_display('cp_' . $this->get_name_short() . '_body'); + return $this->template->assign_display('cp_body'); } } -- cgit v1.2.1