summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-18 23:06:32 -0400
committerFrederic Guillot <fred@kanboard.net>2016-03-18 23:06:32 -0400
commitfa86542f90774d7a7d8f3e81ee35821ca25b7fd4 (patch)
treee6dd027dc827b18e07536414cf4fb86321763060 /doc
parentc4c200b530e0585fafadce41f75e383ec0ff057e (diff)
Added pluggable Avatar providers
Diffstat (limited to 'doc')
-rw-r--r--doc/plugin-avatar-provider.markdown32
-rw-r--r--doc/plugins.markdown7
2 files changed, 36 insertions, 3 deletions
diff --git a/doc/plugin-avatar-provider.markdown b/doc/plugin-avatar-provider.markdown
new file mode 100644
index 00000000..62941e5c
--- /dev/null
+++ b/doc/plugin-avatar-provider.markdown
@@ -0,0 +1,32 @@
+Adding a new Avatar Provider
+=============================
+
+Registration
+------------
+
+```php
+$this->avatarManager->register(new CustomAvatarProvider());
+```
+
+Interface
+---------
+
+The provider must implements the interface `Kanboard\Core\User\Avatar\AvatarProviderInterface`:
+
+
+| Method | Description |
+|-------------------------------|---------------------------------------------------------------|
+| `render(array $user, $size)` | Render HTML |
+| `isActive(array $user)` | Returns a boolean if the provider is able to render something |
+
+
+The `$user` argument is a dictionary that contains these keys:
+
+```php
+[
+ 'id' => 123,
+ 'username' => 'admin',
+ 'name' => 'Administrator',
+ 'email' => 'me@localhost',
+]
+```
diff --git a/doc/plugins.markdown b/doc/plugins.markdown
index e38c887f..475bc249 100644
--- a/doc/plugins.markdown
+++ b/doc/plugins.markdown
@@ -20,9 +20,10 @@ Plugin creators should specify explicitly the compatible versions of Kanboard. I
- [Attach metadata to users, tasks and projects](plugin-metadata.markdown)
- [Authentication architecture](plugin-authentication-architecture.markdown)
- [Authentication plugin registration](plugin-authentication.markdown)
-- [Authorization Architecture](plugin-authorization-architecture.markdown)
-- [Custom Group Providers](plugin-group-provider.markdown)
-- [External Link Providers](plugin-external-link.markdown)
+- [Authorization architecture](plugin-authorization-architecture.markdown)
+- [Custom group providers](plugin-group-provider.markdown)
+- [External link providers](plugin-external-link.markdown)
+- [Add avatar providers](plugin-avatar-provider.markdown)
- [LDAP client](plugin-ldap-client.markdown)
Examples of plugins