hypejunction / hypegroups
Extended group functionalities for Elgg
3.1.1
2019-10-02 14:32 UTC
Requires
- php: >=7.0
- composer/installers: ~1.0
- dev-master
- 3.1.1
- 3.1.0
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/grunt-1.5.3
- dev-dependabot/npm_and_yarn/chownr-1.1.4
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/handlebars-4.7.7
- dev-dependabot/npm_and_yarn/underscore-1.12.1
- dev-dependabot/npm_and_yarn/ini-1.3.8
This package is auto-updated.
Last update: 2024-11-07 16:43:03 UTC
README
Features
- Extended search and sort functionality
- API to add new group subtypes
- API to manage group hierarchies
- API for managing group fields
- API for restricting group tools, as well as using preset tools
Notes
Subtypes
Registering new subtypes and configuring them is made easy.
Here is an example of how to remove groups from the top level of the site, and making them subgroups of a new subtype called classroom.
$svc = elgg()->groups; /* @var $svc \hypeJunction\Groups\GroupsService */ $svc->registerSubtype('classroom', [ 'labels' => [ 'en' => [ 'item' => 'Classroom', 'collection' => 'Classrooms', ], ], 'root' => true, 'identifier' => 'classrooms', 'class' => \CustomPlugin\Classroom::class, 'collections' => [ 'all' => \CustomPlugin\DefaultClassroomCollection::class, 'owner' => \CustomPlugin\OwnedClassroomCollection::class, 'member' => \CustomPlugin\JoinedClassroomCollection::class, ], ]); $svc->registerSubtype('group', [ 'site_menu' => false, 'labels' => [ 'en' => [ 'item' => 'Group', 'collection' => 'Groups', ], ], 'root' => false, 'parents' => ['classroom'], 'identifier' => 'groups', ]);
You can put multiple subtypes into a collection by assigning them to the same identifier
, e.g. you could create usa_state
and canada_province
subtypes and register them for regions
identifier.
Fields
Fields are managed by hypePost. Please see the documentation there for more information.