Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ticket/11201] Refactor profile field system #1948

Merged
merged 50 commits into from Feb 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2471b19
[ticket/11201] Make profile field classes autoloadable
nickvergessen Sep 17, 2013
c665839
[ticket/11201] Remove global use from admin class
nickvergessen Jan 10, 2014
a7e3538
[ticket/11201] Move get_options to type classes
nickvergessen Jan 11, 2014
b3803d5
[ticket/11201] Move get_profile_field() to type classes
nickvergessen Jan 13, 2014
ee78aed
[ticket/11201] Move validate_profile_field() to type class
nickvergessen Jan 14, 2014
dda5992
[ticket/11201] Rename test file for now, so the other tests run
nickvergessen Jan 14, 2014
0d79cca
[ticket/11201] Move get_profile_value() to type class
nickvergessen Jan 14, 2014
190c2e9
[ticket/11201] Remove call by refernce
nickvergessen Jan 14, 2014
d57c43d
[ticket/11201] Move error message generation to type class
nickvergessen Jan 14, 2014
daf21fc
[ticket/11201] Move generate_field() method to type class
nickvergessen Jan 14, 2014
d601aaa
[ticket/11201] Remove type related code from build_insert_sql_array()
nickvergessen Jan 14, 2014
9dec023
[ticket/11201] Add visibility to methods
nickvergessen Jan 14, 2014
cd6bdc7
[ticket/11201] Remove remaining type depending code to type class
nickvergessen Jan 14, 2014
5df7f76
[ticket/11201] Split language options into a new class
nickvergessen Jan 15, 2014
7fd5f16
[ticket/11201] Use a service collection for the types instead of the …
nickvergessen Jan 15, 2014
1dbc2d6
[ticket/11201] Fix dropdown tests
nickvergessen Jan 15, 2014
8e86e56
[ticket/11201] Add database column type to type class
nickvergessen Jan 15, 2014
7d2d18f
[ticket/11201] Move "get type" code into a new function
nickvergessen Jan 15, 2014
bd1425d
[ticket/11201] Use database type from the type class
nickvergessen Jan 15, 2014
78603bb
[ticket/11201] Move language option determination into type class
nickvergessen Jan 15, 2014
0bdec35
[ticket/11201] Move grabbing the input of the language options to typ…
nickvergessen Jan 16, 2014
9653764
[ticket/11201] Move field type depending preparation of the options t…
nickvergessen Jan 17, 2014
5e2ffe0
[ticket/11201] Add abstract base class with shared methods
nickvergessen Jan 17, 2014
ae38cfa
[ticket/11201] Move type specific error messages to type class
nickvergessen Jan 17, 2014
67f477f
[ticket/11201] Allow manipulating the intended variables with the typ…
nickvergessen Jan 17, 2014
af5c747
[ticket/11201] Move preparation of hidden fields to type class
nickvergessen Jan 17, 2014
74d3659
[ticket/11201] Move custom template variable assignment to type class
nickvergessen Jan 17, 2014
0ec6af3
[ticket/11201] Fix construction of dropdown type once again
nickvergessen Jan 17, 2014
aa2f0a6
[ticket/11201] Change type from integer to service name
nickvergessen Jan 17, 2014
39ff387
[ticket/11201] Update schema files and unit test
nickvergessen Jan 17, 2014
431fa7b
[ticket/11201] Inject table names rather then using constants
nickvergessen Jan 18, 2014
876e5e5
[ticket/11201] Cast some variables to integer
nickvergessen Jan 18, 2014
1c884d0
[ticket/11201] Add some commas at the last array entry
nickvergessen Jan 18, 2014
7a8818f
[ticket/11201] Add visibility and remove unused variable
nickvergessen Jan 18, 2014
7fac238
[ticket/11201] Update copyright in class file
nickvergessen Jan 18, 2014
b1bed49
[ticket/11201] Add variables to classes and add constructor doc blocks
nickvergessen Jan 18, 2014
df85364
[ticket/11201] Remove db depending code from field class
nickvergessen Jan 18, 2014
197e026
[ticket/11201] Add a method to return the translated full name of the…
nickvergessen Jan 18, 2014
ad8d449
[ticket/11201] Add tables to constructor in tests
nickvergessen Jan 18, 2014
f40f774
[ticket/11201] Fix some variable names
nickvergessen Jan 18, 2014
0ce98d7
[ticket/11201] Allow translation of profile field name and explanation
nickvergessen Jan 19, 2014
ec8fd57
[ticket/11201] Add commas on last array entry
nickvergessen Jan 19, 2014
4213b93
[ticket/11201] Add parameters and variables to profile field class
nickvergessen Jan 19, 2014
430a0c1
[ticket/11201] Also translate profile fields in UCP and ACP
nickvergessen Jan 19, 2014
12932e8
[ticket/11201] Use !== null, its faster
nickvergessen Jan 19, 2014
514a59f
[ticket/11201] Fix parameter description
nickvergessen Feb 2, 2014
7bcbdfc
[ticket/11201] Rename profilefields class to manager
nickvergessen Feb 2, 2014
cacd43b
[ticket/11201] Remove dependency from types on the manager
nickvergessen Feb 2, 2014
cbad102
[ticket/11201] Split template file into multiple files
nickvergessen Feb 2, 2014
a59d6e9
[ticket/11201] Remove empty calls section from .yml
nickvergessen Feb 2, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
82 changes: 82 additions & 0 deletions phpBB/config/profilefields.yml
@@ -0,0 +1,82 @@
services:
profilefields.manager:
class: phpbb\profilefields\manager
arguments:
- @auth
- @dbal.conn
- @request
- @template
- @profilefields.type_collection
- @user
- %tables.profile_fields%
- %tables.profile_fields_language%
- %tables.profile_fields_data%

profilefields.lang_helper:
class: phpbb\profilefields\lang_helper
arguments:
- @dbal.conn
- %tables.profile_fields_options_language%

profilefields.type_collection:
class: phpbb\di\service_collection
arguments:
- @service_container
tags:
- { name: service_collection, tag: profilefield.type }

profilefields.type.bool:
class: phpbb\profilefields\type\type_bool
arguments:
- @profilefields.lang_helper
- @request
- @template
- @user
tags:
- { name: profilefield.type }

profilefields.type.date:
class: phpbb\profilefields\type\type_date
arguments:
- @request
- @template
- @user
tags:
- { name: profilefield.type }

profilefields.type.dropdown:
class: phpbb\profilefields\type\type_dropdown
arguments:
- @profilefields.lang_helper
- @request
- @template
- @user
tags:
- { name: profilefield.type }

profilefields.type.int:
class: phpbb\profilefields\type\type_int
arguments:
- @request
- @template
- @user
tags:
- { name: profilefield.type }

profilefields.type.string:
class: phpbb\profilefields\type\type_string
arguments:
- @request
- @template
- @user
tags:
- { name: profilefield.type }

profilefields.type.text:
class: phpbb\profilefields\type\type_text
arguments:
- @request
- @template
- @user
tags:
- { name: profilefield.type }
1 change: 1 addition & 0 deletions phpBB/config/services.yml
Expand Up @@ -8,6 +8,7 @@ imports:
- { resource: auth_providers.yml }
- { resource: console.yml }
- { resource: mimetype_guessers.yml }
- { resource: profilefields.yml }

services:
acl.permissions:
Expand Down
4 changes: 4 additions & 0 deletions phpBB/config/tables.yml
Expand Up @@ -10,6 +10,10 @@ parameters:
tables.modules: %core.table_prefix%modules
tables.notification_types: %core.table_prefix%notification_types
tables.notifications: %core.table_prefix%notifications
tables.profile_fields: %core.table_prefix%profile_fields
tables.profile_fields_data: %core.table_prefix%profile_fields_data
tables.profile_fields_options_language: %core.table_prefix%profile_fields_lang
tables.profile_fields_language: %core.table_prefix%profile_lang
tables.posts: %core.table_prefix%posts
tables.topics: %core.table_prefix%topics
tables.user_notifications: %core.table_prefix%user_notifications
Expand Down